Reputation: 109
I am trying to run a jsf 2.1 application on Glassfish2.1. WAR file deploys successfully, but when I run the application, it gives HTTP 404 error. In the log, I can see the following
SEVERE: PWC6117: File "C:\Project\CA\workspace\.metadata\.plugins\com.sun.enterprise.jst.server.sunappsrv91\v2domain2\applications\j2ee-modules\fal\search.jsp" not found
I wonder why it is expecting JSP, the URL it should be looking for is fal/search.jsf. I have run this application on JBoss7.1, and it runs perfectly there. There are no JSPs in my applications, I have created .xhtml files. Here is the relevent content of my web.xml
<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>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<!-- Maintain page state on client side -->
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
And faces-context.xml
<navigation-rule>
<from-view-id>/search.xhtml</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/info.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
I tried adding *.jsp in the url-pattern of this servlet in web-xml, and that didn't work either. I got
javax.servlet.ServletException: PWC1232: Exceeded maximum depth for nested request dispatches: 20
So why is it looking for JSP?? Is there a way to solve this?
We were not able to solve this on Glassfish 2.1. Finally we moved to JBoss 7.1.
Upvotes: 0
Views: 167
Reputation: 109
It seems that glassfish2.x will not work with jsf2.x. We either have to upgrade glassfish to 3.x or downgrade jsf to 1.x. I upgraded glassfish to make it work.
Upvotes: 0