Seam / Facelets problem (partially OT)
mmarcom May 29, 2006 1:38 PMhi all,
sorry for OT, but i was wondering if someone else got same problem and got it solved.
i implemented a very simple seam app (like the registration example), first using jsps and then moving to facelets.
i have a base index.html which is supposed to load the next page this way
<html> <head> <meta http-equiv="Refresh" content="0; URL=register.seam"> </head> </html>
this has worked fine until i moved to facelets..... and i cannot figure out why. i have 'copied' settings from another app that i have done using facelets (and i also had a look at dvdstore or booking example to see what facelets required) but still i cannot figure out what i am missing
here's my web.xml
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<display-name>Archetype Created Web Application</display-name>
<listener>
<listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
</listener>
<!-- MyFaces -->
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
<!-- Global JNDI name pattern for JBoss EJB3 (change for other servers) -->
<context-param>
<param-name>org.jboss.seam.core.init.jndiPattern</param-name>
<param-value>${ear.name}-1.0/#{ejbName}/local</param-value>
</context-param>
<context-param>
<param-name>org.jboss.seam.core.init.debug</param-name>
<param-value>true</param-value>
</context-param>
<!-- Facelets start -->
<!-- Use Documents Saved as *.xhtml -->
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<!-- Special Debug Output for Development -->
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<!-- Facelets end -->
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</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>*.seam</url-pattern>
</servlet-mapping>
</web-app>
and here's my faces-config.xml
<?xml version="1.0" encoding="ISO-8859-1"?> <!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> <application> <message-bundle>messages</message-bundle> <locale-config> <default-locale>en_US</default-locale> <supported-locale>en</supported-locale> </locale-config> </application> <application> <view-handler>com.sun.facelets.FaceletViewHandler</view-handler> </application> <lifecycle> <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener> </lifecycle> <navigation-rule> <navigation-case> <from-outcome>success</from-outcome> <to-view-id>/result.xhtml</to-view-id> </navigation-case> </navigation-rule> <navigation-rule> <navigation-case> <from-outcome>error</from-outcome> <to-view-id>/error.xhtml</to-view-id> </navigation-case> </navigation-rule> <navigation-rule> <navigation-case> <from-outcome>start</from-outcome> <to-view-id>/register.xhtml</to-view-id> </navigation-case> </navigation-rule> <navigation-rule> <navigation-case> <from-outcome>end</from-outcome> <to-view-id>/end.xhtml</to-view-id> </navigation-case> </navigation-rule> </faces-config> i post here in case anyone has found similar problems.... i'll search at same time on facelets lists.. thanks nd regards marco