[jboss-user] [JBoss Seam] - Re: seam + ajax4jsf + facelets

tobad do-not-reply at jboss.com
Tue Sep 12 03:20:31 EDT 2006


Hi
We have this combination working.
As we are using the fastfilter you need to donwload and have nekohtml.jar  and xerces in your classpath

Here are our config files
web.xml

  | <?xml version="1.0" encoding="UTF-8"?>
  | <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  |    <!-- Seam -->
  |     
  |     <listener>
  |         <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
  |     </listener>
  |     
  |     <!-- JSF -->
  |     <context-param>
  |         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
  |         <param-value>client</param-value>
  |     </context-param>
  |     
  |     <context-param>
  |         <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
  |         <param-value>.xhtml</param-value>
  |     </context-param>
  |     
  |     <context-param>
  |         <param-name>facelets.DEVELOPMENT</param-name>
  |         <param-value>true</param-value>
  |     </context-param>
  |     
  |     <context-param>
  |         <param-name>facelets.LIBRARIES</param-name>
  |         <param-value>/WEB-INF/tomahawk.taglib.xml;/WEB-INF/joda.taglib.xml;/WEB-INF/keybroker.taglib.xml</param-value>
  |     </context-param>  
  |     
  |     <context-param>
  |         <param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name>
  |         <param-value>50</param-value>
  |     </context-param>    
  |     
  |     <!--context-param>
  |         <param-name>org.apache.myfaces.SERIAL_FACTORY</param-name>
  |         <param-value>com.keybroker.util.JbossSerialFactory</param-value>
  |     </context-param-->    
  |     
  |     <servlet>
  |         <servlet-name>Faces Servlet</servlet-name>
  |         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
  |         <load-on-startup>1</load-on-startup>
  |     </servlet>
  |     
  |     <!-- Faces Servlet Mapping -->
  |     
  |     <servlet-mapping>
  |         <servlet-name>Faces Servlet</servlet-name>
  |         <url-pattern>*.jsf</url-pattern>
  |     </servlet-mapping>
  |     
  |     <servlet>
  |         <servlet-name>Seam Remoting</servlet-name>
  |         <servlet-class>org.jboss.seam.remoting.SeamRemotingServlet</servlet-class>
  |     </servlet>
  |     
  |     <servlet-mapping>
  |         <servlet-name>Seam Remoting</servlet-name>
  |         <url-pattern>/seam/remoting/*</url-pattern>
  |     </servlet-mapping>       
  |     
  |     <!-- Seam filters -->
  |     <!-- Ajax4JSF Initial parameters -->
  |     <filter>
  |         <display-name>Ajax4jsf Filter</display-name>
  |         <filter-name>ajax4jsf</filter-name>
  |         <filter-class>org.ajax4jsf.framework.ajax.xmlfilter.NekkoFilter</filter-class>
  |         <init-param>
  |             <param-name>forceparser</param-name>
  |             <param-value>true</param-value>
  |         </init-param>
  |         <init-param>
  |             <param-name>enable-cache</param-name>
  |             <param-value>false</param-value>
  |         </init-param>        
  |     </filter>
  |     <filter-mapping>
  |         <filter-name>ajax4jsf</filter-name>
  |         <url-pattern>/*</url-pattern>
  |     </filter-mapping>  
  |     
  |     <context-param>
  |         <param-name>org.ajax4jsf.SKIN</param-name>
  |         <param-value>DEFAULT</param-value>
  |     </context-param>    
  |     
  |     
  |     
  |     
  |     <context-param>
  |         <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
  |         <param-value>com.sun.facelets.FaceletViewHandler</param-value>
  |     </context-param>   
  |     
  |     
  |     
  |     <!-- Propagate conversations across redirects -->
  |     <filter>
  |         <filter-name>Seam Redirect Filter</filter-name>
  |         <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
  |     </filter>
  |     
  |     <filter-mapping>
  |         <filter-name>Seam Redirect Filter</filter-name>
  |         <url-pattern>*.jsf</url-pattern>
  |     </filter-mapping>
  |     
  |     <filter>
  |         <filter-name>Seam Servlet Filter</filter-name>
  |         <filter-class>org.jboss.seam.servlet.SeamServletFilter</filter-class>
  |     </filter>  
  |     
  |       
  |     <!-- MyFaces -->
  |     <listener>
  |         <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
  |     </listener>
  |     
  |     <filter>
  |         <filter-name>ExtensionsFilter</filter-name>
  |         <filter-class>
  |             org.apache.myfaces.webapp.filter.ExtensionsFilter
  |         </filter-class>
  |         <init-param>
  |             <param-name>uploadMaxFileSize</param-name>
  |             <param-value>10m</param-value>
  |         </init-param>
  |         <init-param>
  |             <param-name>uploadThresholdSize</param-name>
  |             <param-value>100k</param-value>
  |         </init-param>
  |     </filter>
  |     <filter-mapping>
  |         <filter-name>ExtensionsFilter</filter-name>
  |         <servlet-name>Faces Servlet</servlet-name>
  |     </filter-mapping>   
  |     <filter-mapping>
  |         <filter-name>ExtensionsFilter</filter-name>
  |         <url-pattern>*.jsf</url-pattern>
  |     </filter-mapping>
  |     <filter-mapping>
  |         <filter-name>ExtensionsFilter</filter-name>
  |         <url-pattern>/faces/*</url-pattern>
  |     </filter-mapping>   
  | </web-app>
  | 

faces-config.xml

  | .....
  |     <lifecycle>
  |         <phase-listener>org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener</phase-listener>
  |     </lifecycle>
  | 
  | </faces-config>
  | 

Hope this helps.
Regards
Tobias

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

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



More information about the jboss-user mailing list