[jboss-user] [JBoss Portal] - RichFaces/Ajax4JSF JS and XCSS not found

CarstenRudat do-not-reply at jboss.com
Wed Mar 19 11:00:00 EDT 2008


Hi all,

I have JBoss Poral 2.6.4 running on JBoss 4.2.2.GA (all config, -ha deployment) and I adopted the portlet-bridge-seam example.
My application uses facelets and it has deployed, but I cannot get the three artefacts:


  | /rfRes/org/ajax4jsf/framework.pack.js
  | /rfRes/org/richfaces/ui.pack.js
  | /rfRes/org/richfaces/skin.xcss
  | 

Each of them ends in an Http 404 error.

In my WAR/lib I have jsf-facelts.jar, portletbridge-xxx/api/impl.jar, richfaces-api/impl/ui.jar, tomahawk-1.1.6.jar, tomahawk-facelets-taglib.jar and json, some commons-jars. 
My configuration:

web.xml

  | 
  | 
  | <?xml version="1.0" encoding="UTF-8"?>
  | <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  |   <display-name>test-web</display-name>
  |   
  |   
  |   <welcome-file-list>
  |     <welcome-file>index.html</welcome-file>
  |     <welcome-file>index.htm</welcome-file>
  |     <welcome-file>index.jsp</welcome-file>
  |     <welcome-file>default.html</welcome-file>
  |     <welcome-file>default.htm</welcome-file>
  |     <welcome-file>default.jsp</welcome-file>
  |   </welcome-file-list>
  |   
  |   <listener>
  |   	<listener-class>com.genloop.commons.web.DataServiceSessionListener</listener-class>
  | 	</listener>
  | 	
  | 	<listener>
  |     <listener-class>org.jboss.portal.portlet.session.SessionListener</listener-class>
  |   </listener>
  |   
  |   <servlet>
  |   	<servlet-name>autocompleter</servlet-name>
  |   	<servlet-class>com.genloop.commons.web.ajax.AutoCompleterServlet</servlet-class>
  | 	</servlet>
  | 	<servlet-mapping>
  | 	  <servlet-name>autocompleter</servlet-name>
  | 	  <url-pattern>/autocompleter/*</url-pattern>
  | 	</servlet-mapping>
  | 	
  | 	<servlet>
  |   	<servlet-name>download</servlet-name>
  |   	<servlet-class>com.genloop.commons.web.download.DownloadServlet</servlet-class>
  | 	</servlet>
  | 	<servlet-mapping>
  |   	<servlet-name>download</servlet-name>
  |   	<url-pattern>/download/*</url-pattern>
  | 	</servlet-mapping>
  | 	
  | 	<servlet>
  |   	<servlet-name>downloadredirect</servlet-name>
  |   	<servlet-class>com.genloop.commons.web.download.DownloadRedirecterServlet</servlet-class>
  | 	</servlet>
  | 	<servlet-mapping>
  |   	<servlet-name>downloadredirect</servlet-name>
  |   	<url-pattern>/downloadredirect</url-pattern>
  | 	</servlet-mapping>
  |   
  |    
  |   <!-- Use Documents Saved as *.xhtml -->  
  |   <context-param>
  |     <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
  |     <param-value>.xhtml</param-value>
  |   </context-param>
  |   
  |   <!-- Add additional faces-config files -->
  |   <context-param>
  |     <param-name>javax.faces.CONFIG_FILES</param-name>
  |     <param-value>
  |       /WEB-INF/faces-config.xml,
  |       /WEB-INF/faces-beans.xml,
  |       /WEB-INF/faces-nav.xml
  |     </param-value>
  |   </context-param>
  |   
  |   <!-- BEGIN: State Saving Configuration -->
  |   <context-param>
  |     <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
  |     <param-value>client</param-value>
  |     <!--param-value>server</param-value-->
  |   </context-param>
  |   
  |   <!-- Sun JSF RI only -->
  |   <context-param>
  |     <param-name>com.sun.faces.clientStateWriteBufferSize</param-name>
  |     <param-value>32768</param-value>
  |   </context-param>
  |   
  |   <!-- Special Debug Output for Development -->
  |   <context-param>
  |     <param-name>facelets.DEVELOPMENT</param-name>
  |     <param-value>true</param-value>
  |   </context-param>
  |   <context-param>
  |     <param-name>facelets.BUFFER_SIZE</param-name>
  |     <param-value>8196</param-value>
  |   </context-param>
  |   
  |   <context-param>
  |     <param-name>com.sun.faces.verifyObjects</param-name>
  |     <param-value>true</param-value>
  |   </context-param>
  |   
  |   <!-- Richfaces Parameters -->
  |   <!-- Ajax4jsf view handlers -->
  |   <context-param>
  |     <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
  |     <!--param-value>com.sun.facelets.FaceletViewHandler</param-value-->
  |     <param-value>org.jboss.portletbridge.application.FaceletPortletViewHandler</param-value>
  |   </context-param>
  |   
  |   <!-- PortletBridge config begin -->
  |   <context-param>
  |     <param-name>org.jboss.portletbridge.ExceptionHandler</param-name>
  |     <param-value>org.jboss.portletbridge.ExceptionHandlerImpl</param-value>
  |   </context-param>
  |   
  |   <context-param>
  |     <param-name>javax.portlet.faces.renderPolicy</param-name>
  |     <param-value>ALWAYS_DELEGATE</param-value>
  |   </context-param>
  |   
  |   <context-param>
  |       <param-name>javax.portlet.faces.preserveActionParams</param-name>
  |       <param-value>true</param-value>
  |   </context-param>
  |   
  |   <!-- 
  |   <context-param>
  |     <param-name>javax.faces.LIFECYCLE_ID</param-name>
  |     <param-value>GENLOOP_PORTLET</param-value>
  |   </context-param>
  |   -->
  |   
  |   <context-param>
  |     <param-name>org.ajax4jsf.RESOURCE_URI_PREFIX</param-name>
  |     <param-value>rfRes</param-value>
  |   </context-param>
  |   
  |   <context-param>
  |       <param-name>org.richfaces.LoadStyleStrategy</param-name>
  |       <param-value>NONE</param-value>
  |   </context-param>
  |   
  |   <context-param>
  |       <param-name>org.richfaces.LoadScriptStrategy</param-name>
  |       <param-value>NONE</param-value>
  |   </context-param>
  |   
  |   <context-param>
  |       <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
  |       <param-value>false</param-value>
  |   </context-param>
  |   
  |   <context-param>         
  |    <param-name>com.sun.faces.serializationProvider</param-name>
  |    <param-value>org.jboss.web.jsf.integration.serialization.JBossSerializationProvider</param-value>
  |   </context-param>
  |   
  |   <servlet>
  |     <servlet-name>SourceForgeWebdavServlet</servlet-name>
  |     <servlet-class>
  |       net.sf.webdav.WebdavServlet
  |     </servlet-class>
  |     <init-param>
  |       <param-name>ResourceHandlerImplementation</param-name>
  |       <param-value>
  |         net.sf.webdav.LocalFileSystemStorage
  |       </param-value>
  |     </init-param>
  |     <init-param>
  |       <param-name>rootpath</param-name>
  |       <param-value>/Users/carsten/tmp</param-value>
  |     </init-param>
  |     <init-param>
  |       <param-name>storeDebug</param-name>
  |       <param-value>0</param-value>
  |     </init-param>
  |   </servlet>
  |   
  |   <servlet-mapping>
  |     <servlet-name>SourceForgeWebdavServlet</servlet-name>
  |     <url-pattern>/sfwebdav/*</url-pattern>
  |   </servlet-mapping>
  |   
  |    <servlet>
  |     <servlet-name>ApacheWebdavServlet</servlet-name>
  |     <servlet-class>org.apache.catalina.servlets.WebdavServlet</servlet-class>
  |     <init-param>
  |       <param-name>debug</param-name>
  |       <param-value>0</param-value>
  |     </init-param>
  |     <init-param>
  |       <param-name>listings</param-name>
  |       <param-value>true</param-value>
  |     </init-param>
  |      <init-param>
  |       <param-name>readonly</param-name>
  |       <param-value>false</param-value>
  |     </init-param>
  |    </servlet>
  | 
  |   <servlet-mapping>
  |     <servlet-name>ApacheWebdavServlet</servlet-name>
  |     <url-pattern>/webdav/*</url-pattern>
  |   </servlet-mapping>
  |   
  |   <servlet>
  |     <servlet-name>Faces Servlet</servlet-name>
  |     <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
  |     <load-on-startup>1</load-on-startup>
  |   </servlet>
  |  
  |   
  |   <servlet-mapping>
  |     <servlet-name>Faces Servlet</servlet-name>
  |     <url-pattern>/faces/*</url-pattern>
  |   </servlet-mapping>
  |   
  |   <filter>
  | 	  <filter-name>MyFacesExtensionsFilter</filter-name>
  | 	  <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
  | 	    <init-param>
  | 	        <param-name>uploadMaxFileSize</param-name>
  | 	        <param-value>50m</param-value>
  | 	    </init-param>
  | 	    <init-param>
  | 	      <param-name>uploadThresholdSize</param-name>
  | 	      <param-value>500k</param-value>
  | 	    </init-param>
  | 	    <init-param>
  | 	      <param-name>uploadRepositoryPath</param-name>
  | 	      <param-value>/tmp</param-value>
  | 	    </init-param>
  | 	</filter>
  | 	<filter-mapping>
  | 	 <filter-name>MyFacesExtensionsFilter</filter-name>
  | 	   <servlet-name>Faces Servlet</servlet-name>
  | 	 </filter-mapping>
  | 	 <filter-mapping>
  | 	   <filter-name>MyFacesExtensionsFilter</filter-name>
  | 	   <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
  |   </filter-mapping>
  |   
  |   
  |   <filter>
  |   	<filter-name>UTF8Filter</filter-name>
  |   	<filter-class>com.genloop.commons.web.base.UTF8Filter</filter-class>
  | 	</filter>
  | 	<filter-mapping>
  |   	<filter-name>UTF8Filter</filter-name>
  |   	<servlet-name>Faces Servlet</servlet-name>
  | 	</filter-mapping>
  | 
  |   
  |   <session-config>
  | 	  <session-timeout>600</session-timeout>
  |   </session-config>
  |   
  |   <!-- EJB Ref -->
  |   <ejb-local-ref>
  |    	some ejb refs
  |   </ejb-local-ref>
  |   
  |   <env-entry>
  | 	some entries
  |   </env-entry>
  |   
  | </web-app>
  | 

faces-config.xml

  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <faces-config
  |     xmlns="http://java.sun.com/xml/ns/javaee"
  |     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  |     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
  |     version="1.2">
  | 	<application>
  | 		<locale-config>
  | 			<default-locale>de</default-locale>
  | 			<supported-locale>de</supported-locale>
  | 		</locale-config>
  | 		<message-bundle>
  | 			com.genloop.ejb.commons.MessageResource
  | 		</message-bundle>
  | 		
  | 		<view-handler>
  |       org.jboss.portletbridge.application.FaceletPortletViewHandler
  |     </view-handler>
  |     <state-manager>
  |        org.jboss.portletbridge.application.PortalStateManager
  |     </state-manager>
  | 	</application>
  | 	
  |   <factory>
  |     <faces-context-factory>
  |       org.jboss.portletbridge.context.FacesContextFactoryImpl
  |     </faces-context-factory>
  |   </factory>
  | 
  | beans and nav-rules
  | 
  | 	<lifecycle>
  | 		<phase-listener>com.genloop.jsf.listener.RenderResponsePhaseListener</phase-listener>
  | 	</lifecycle>
  | </faces-config>
  | 


jboss-portlet.xml

  | <?xml version="1.0"?>
  | <!DOCTYPE portlet-app PUBLIC
  |    "-//JBoss Portal//DTD JBoss Portlet 2.6//EN"
  |    "http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd">
  | <portlet-app>
  |   <portlet>
  |     <portlet-name>test_testWebPortlet</portlet-name>
  |     <header-content>
  |       <script src="/faces/rfRes/org/ajax4jsf/framework.pack.js" type="text/javascript" />
  |       <script src="/faces/rfRes/org/richfaces/ui.pack.js" type="text/javascript" />
  |       <link rel="stylesheet" type="text/css" href="/faces/rfRes/org/richfaces/skin.xcss" />
  |       <link rel="stylesheet" type="text/css" href="/css/design_cs.css" media="screen" />
  |       <link rel="stylesheet" type="text/css" href="/css/design.css" media="screen" />
  |     </header-content>
  |     <!--session-config>
  |       <distributed>true</distributed>
  |     </session-config-->
  |   </portlet>
  | </portlet-app>
  | 


portlet.xml


  | <portlet-app version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  |   xsi:schemaLocation="http://java.sun.com/xml/ns/portlet"
  |   xmlns="http://java.sun.com/xml/ns/portlet">
  |   <portlet>
  |     <!--  'Project'_'File'WebPortlet -->
  |     <portlet-name>test_testWebPortlet</portlet-name>
  |     <portlet-class>
  |       javax.portlet.faces.GenericFacesPortlet
  |     </portlet-class>
  | 
  |     <init-param>
  |       <name>javax.portlet.faces.defaultViewId.view</name>
  |       <!-- Index-Seite der GLP-Applikation -->
  |       <value>/test.xhtml</value>
  |     </init-param>
  |     <init-param>
  |       <name>javax.portlet.faces.preserveActionParams</name>
  |       <value>true</value>
  |     </init-param>
  |     <init-param>
  |       <description>Whether we should use ssl on login and throughout the Portal. 1=yes;0=no</description>
  |       <name>useSSL</name>
  |       <value>0</value>
  |     </init-param>
  |     <expiration-cache>-0</expiration-cache>
  |     <portlet-info>
  |        <!--  'Projekttitel' Portlet -->
  |        <title>Test Portlet</title>
  |     </portlet-info>
  |     <supports>
  |       <mime-type>text/html</mime-type>
  |       <portlet-mode>VIEW</portlet-mode>
  |     </supports>
  |   </portlet>
  | </portlet-app>
  | 

Do I have to set up an listener or filter for serving the js-files out of the richfaces-jars?

Thanks,
Carsten

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4137798#4137798

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4137798



More information about the jboss-user mailing list