-
1. Re: Can Seam be configured to support JSP and Facelets in an
jbpmndc Jul 6, 2006 10:21 AM (in response to gfzhang)I'm curious about this as well.
-
2. Re: Can Seam be configured to support JSP and Facelets in an
cptnkirk Jul 6, 2006 10:34 AM (in response to gfzhang)Yes it is. Set your facelets.VIEW_MAPPINGS like you have done and use prefex matching for the JSF servlet.
<servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping>
You can then go to either /faces/somepage.jsp or /faces/somepage.xhtml. -
3. Re: Can Seam be configured to support JSP and Facelets in an
gavin.king Jul 10, 2006 12:28 AM (in response to gfzhang)right
-
4. Re: Can Seam be configured to support JSP and Facelets in an
vlasov01 Jul 10, 2006 9:02 PM (in response to gfzhang)Hello
I've changed booking example to use jsp, but I'm getting the following error:
2006-07-10 17:16:21,921 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/seam-booking].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
java.lang.StackOverflowError
at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:215)
at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:544)
at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:215)
at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:544)<?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> <!-- 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>*.seam</url-pattern> </filter-mapping> <!-- 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.VIEW_MAPPINGS</param-name> <param-value>*.xhtml</param-value> </context-param> <context-param> <param-name>facelets.DEVELOPMENT</param-name> <param-value>true</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> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> <!-- MyFaces --> <listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> </listener> <!-- JSF RI --> <!-- <listener> <listener-class>com.sun.faces.config.ConfigureListener</listener-class> </listener> --> </web-app>
-
5. Re: Can Seam be configured to support JSP and Facelets in an
gfzhang Jul 11, 2006 1:51 AM (in response to gfzhang)After changing the servlet mapping according to CptnKirk's instruction, The modified sample works well.
You please try:<filter-mapping> <filter-name>Seam Redirect Filter</filter-name> <url-pattern>/faces/*</url-pattern> </filter-mapping>
and<!-- Faces Servlet Mapping --> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping>
I do not know why the program failed when using"/*" as the url-pattern. It can not work here either. It display the same error message as you reported. -
6. Re: Can Seam be configured to support JSP and Facelets in an
gavin.king Jul 11, 2006 12:11 PM (in response to gfzhang)"gfzhang" wrote:
I do not know why the program failed when using"/*" as the url-pattern. It can not work here either. It display the same error message as you reported.
I don't think JSF supports that.... -
7. Re: Can Seam be configured to support JSP and Facelets in an
vlasov01 Jul 11, 2006 7:41 PM (in response to gfzhang)Guofeng
I've tried your suggestion but in't work well for me.
From http://localhost:8080/seam-booking/ got redirected to http://localhost:8080/seam-booking/home.seam where I got 404 error:HTTP Status 404 - /home.jsp type Status report message /home.jsp description The requested resource (/home.jsp) is not available. Apache Tomcat/5.5.17
-
8. Re: Can Seam be configured to support JSP and Facelets in an
gfzhang Jul 11, 2006 10:46 PM (in response to gfzhang)I modify the booking sample as described above. I did not create any jsp files, so I use the files provided by the sample, that is, use xhtml as the suffix. It works.
tryhttp://localhost:8080/seam-booking/faces/home.xhtml
or change index.html to<html> <head> <meta http-equiv="Refresh" content="0; URL=faces/home.xhtml"> </head> </html>
-
9. Re: Can Seam be configured to support JSP and Facelets in an
cptnkirk Jul 11, 2006 10:52 PM (in response to gfzhang)You'll have an easier time starting a new JSF project from scratch.
* Make the above changes and create two files in your web root. test.jsp and test1.xhtml.
* Have one use JSP/JSF and the other Facelets/JSF.
* Then navigate to /faces/test.jsp and /faces/test.xhtml.
Both JSF pages should render. -
10. Re: Can Seam be configured to support JSP and Facelets in an
vlasov01 Jul 12, 2006 10:42 PM (in response to gfzhang)Guofeng,
It's working now. Thank you for your help! -
11. Re: Can Seam be configured to support JSP and Facelets in an
dcshonda Dec 12, 2007 4:27 AM (in response to gfzhang)Hi everyone,
I have a similar problem. I have tried your solutions, but it doesn´t work. My problem is that when I have a datatable in a portlet, and I want to see another page of the datatable, it redirect to faces/home.xhtml, and I don´t want that ir redirect to faces/... because I have my views in webapp directory.
Sorry very much, for my english.
Mi web.xml is as follows:<web-app 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" version="2.4"> <description>JbossPortalBuscadorOperaciones</description> <context-param> <param-name>javax.portlet.faces.BridgeImplClass</param-name> <param-value>org.apache.myfaces.portlet.faces.bridge.BridgeImpl</param-value> </context-param> <!-- <context-param> <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name> <param-value>org.ajax4jsf.portlet.application.FaceletPortletViewHandler</param-value> </context-param> <filter> <display-name>Ajax4jsf Filter</display-name> <filter-name>ajax4jsf</filter-name> <filter-class>org.ajax4jsf.Filter</filter-class> </filter> <filter-mapping> <filter-name>ajax4jsf</filter-name> <servlet-name>Faces Servlet</servlet-name> <dispatcher>FORWARD</dispatcher> <dispatcher>REQUEST</dispatcher> <dispatcher>INCLUDE</dispatcher> </filter-mapping>--> <!-- Seam --> <listener> <listener-class>org.jboss.seam.servlet.SeamListener</listener-class> </listener> <servlet> <servlet-name>Seam Resource Servlet</servlet-name> <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>Seam Resource Servlet</servlet-name> <url-pattern>/seam/resource/*</url-pattern> </servlet-mapping> <filter> <filter-name>Seam Filter</filter-name> <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class> </filter> <filter-mapping> <filter-name>Seam Filter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- JSF --> <!--<context-param> <param-name>org.ajax4jsf.xmlparser.ORDER</param-name> <param-value>NEKO,TIDY,NONE</param-value> </context-param>--> <!--<context-param> <param-name>org.ajax4jsf.xmlparser.TIDY</param-name> <param-value>/pages/repeater.xhtml,/pages/tabs.xhtml</param-value> </context-param>--> <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>server</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>false</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> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.seam</url-pattern> </servlet-mapping> <listener> <listener-class>com.sun.faces.config.ConfigureListener</listener-class> </listener> <session-config> <session-timeout>30</session-timeout> </session-config> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> </web-app>
If anyone can help me...
Thank you anyway.