[jboss-user] [JBoss Seam] - Strange behaviour of Seam together with JSF RI 1.2 and Trini
hamtho2
do-not-reply at jboss.com
Tue Jan 30 10:25:02 EST 2007
Hi @all,
thanks to the various post I got myfaces running together with trinidad and I also got JSF RI running together with trinidad. But the strange thing is, that with the JSF RI Version I receive double-page-headers, but only if I refer to the same page with returning null from an actionBean or after returning to the same page with failed validation.
As far as I could work it out it might have anything to do with the view-handler configurations. If I use the jsf RI together with <view-handler>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</view-handler> and remove the trinidad-configuration everything works fine. But to use trinidad as well I have to add the following 2 lines to the faces-config
|
| <el-resolver>org.jboss.seam.jsf.SeamELResolver</el-resolver> <default-render-kit-id>org.apache.myfaces.trinidad.core</default-render-kit-id>
Does anyone know the correct setting or configuration to have this combination (JSF RI 1.2, Trinidad M1, Seam) work.
This is what I got so far:
faces-config.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE faces-config
| PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
| "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
| <faces-config>
|
| <!-- Phase listener needed for all Seam applications -->
| <lifecycle>
| <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
|
| </lifecycle>
|
| <application>
| <!-- only for JSF-RI --><el-resolver>org.jboss.seam.jsf.SeamELResolver</el-resolver>
| <default-render-kit-id>org.apache.myfaces.trinidad.core</default-render-kit-id>
| <locale-config>
| <default-locale>de_DE</default-locale>
| <supported-locale>de_DE</supported-locale>
| <supported-locale>en_US</supported-locale>
| </locale-config>
| <!-- NOT WITH trinidad <view-handler>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</view-handler>-->
|
| </application>
| </faces-config>
|
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>
|
| <!-- Listener for use with MyFaces -->
|
| <!--<listener>
| <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
| </listener>-->
|
|
| <!-- Listener for use with Sun JSF RI -->
| <listener>
| <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
| </listener>
|
| <context-param>
| <param-name>com.sun.faces.verifyObjects</param-name>
| <param-value>true</param-value>
| <description>
| Set this flag to true, if you want the JavaServer Faces Reference
| Implementation to verify that all of the application objects you
| have configured (components, converters, renderers, and validators) can
| be successfully created. Default value is false.
| </description>
|
| </context-param>
|
| <context-param>
| <param-name>com.sun.faces.validateXml</param-name>
| <param-value>true</param-value>
| <description>
| Set this flag to true, if you want the JavaServer Faces Reference Implementation
| to validate the XML in your faces-config.xml resources against the DTD. Default value is false.
| </description>
| </context-param>
|
| <!--
| <context-param>
| <param-name>org.jboss.seam.core.init.componentClasses</param-name>
| <param-value>org.jboss.seam.core.Jbpm</param-value>
| </context-param>-->
|
| <!-- 300 second conversation timeout -->
| <!--<context-param>
| <param-name>org.jboss.seam.core.manager.conversationTimeout</param-name>
| <param-value>300000</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>javax.faces.STATE_SAVING_METHOD</param-name>
| <param-value>client</param-value>
| </context-param>
|
| <context-param>
| <param-name>facelets.DEVELOPMENT</param-name>
| <param-value>true</param-value>
| </context-param>
|
| <context-param>
| <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
| <param-value>com.sun.facelets.FaceletViewHandler</param-value>
| </context-param>
|
| <!-- If you have other filters declared in the web.xml, be sure that Ajax4jsf Filter is declared before the others. -->
| <filter>
| <display-name>Ajax4jsf Filter</display-name>
| <filter-name>ajax4jsf</filter-name>
| <filter-class>org.ajax4jsf.Filter</filter-class>
| </filter>
|
| <filter>
| <filter-name>trinidad</filter-name>
| <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
| </filter>
|
| <filter>
| <filter-name>Seam Exception Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
| </filter>
|
| <filter>
| <filter-name>Seam Redirect Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
| </filter>
|
| <!-- If you have other filters declared in the web.xml, be sure that Ajax4jsf Filter is declared before the others. -->
| <filter-mapping>
| <filter-name>ajax4jsf</filter-name>
| <servlet-name>Faces Servlet</servlet-name>
| <dispatcher>REQUEST</dispatcher>
| <dispatcher>FORWARD</dispatcher>
| <dispatcher>INCLUDE</dispatcher>
| </filter-mapping>
|
| <filter-mapping>
| <filter-name>trinidad</filter-name>
| <servlet-name>Faces Servlet</servlet-name>
| </filter-mapping>
|
| <filter-mapping>
| <filter-name>Seam Exception Filter</filter-name>
| <url-pattern>/*</url-pattern>
| </filter-mapping>
|
| <filter-mapping>
| <filter-name>Seam Redirect Filter</filter-name>
| <url-pattern>*.seam</url-pattern>
| </filter-mapping>
|
| <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>*.seam</url-pattern>
| </servlet-mapping>
|
| <!-- trinidad resources servlet -->
| <!--<servlet>
| <servlet-name>resources</servlet-name>
| <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
| </servlet>-->
|
| <!-- This cannot be configured currently -->
| <!--<servlet-mapping>
| <servlet-name>resources</servlet-name>
| <url-pattern>/adf/*</url-pattern>
| </servlet-mapping>-->
|
| <!--<security-constraint>
| <display-name>Restrict XHTML Documents</display-name>
| <web-resource-collection>
| <web-resource-name>XHTML</web-resource-name>
| <url-pattern>*.xhtml</url-pattern>
| </web-resource-collection>
| <auth-constraint>
| <description>Only Let 'developer's access XHTML pages</description>
| <role-name>developer</role-name>
| </auth-constraint>
| </security-constraint>-->
|
|
|
| </web-app>
|
|
Thanks for your help
Thomas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008345#4008345
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008345
More information about the jboss-user
mailing list