Wrong mapping in web.xml due to jboss-seam-1.1.0.GA
lara Dec 20, 2006 11:29 AMHi, I am just adding the same blog again by modifying the title because it wasn't clear at all.
I am having problems with the mapping in the web.xml file because everytime I point to a page with the extension specified in the web.xml file, I am getting a file download window instead of the page itself opened. In my case the mapping was jsfx.
Thus, when I deploy the project, I don't get any error on the server and everything looks fine but when I try to write the url of a page in the browser, let us say:
http://localhost:8080/bpmshell/executors.jsfx
I get this pop-up window like if I am downloading a file which shows that the mapping is incorrect, check the link for details:
http://tinypic.com/view/?pic=2mgpdgk
The code on the server looks as follows:
04:06:17,453 INFO [FacesConfigurator] Reading standard config org/apache/myfaces/resource/standard-faces-config.xml 04:06:17,546 INFO [FacesConfigurator] Reading config jar:file:/D:/servers/jboss-4.0.5.GA/server/default/tmp/deploy/tmp17588bpmshell.ear-contents/bpmshell.ejb3-contents/jboss-seam.jar!/META-INF/faces-config.xml 04:06:17,562 INFO [FacesConfigurator] Reading config jar:file:/D:/servers/jboss-4.0.5.GA/server/default/./tmp /deploy/tmp17588bpmshell.ear-contents/bpmshell-exp.war/WEB-INF/lib/jboss-seam-debug.jar!/META-INF/faces-config.xml 04:06:17,578 INFO [FacesConfigurator] Reading config jar:file:/D:/servers/jboss-4.0.5.GA/server/default/./tmp /deploy/tmp17588bpmshell.ear-contents/bpmshell-exp.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/faces-config.xml 04:06:17,625 INFO [FacesConfigurator] Reading config jar:file:/D:/servers/jboss-4.0.5.GA/server/default/./tmp /deploy/tmp17588bpmshell.ear-contents/bpmshell-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/faces-config.xml 04:06:17,640 INFO [FacesConfigurator] Reading config /WEB-INF/faces-config.xml 04:06:17,796 WARN [LocaleUtils] Locale name in faces-config.xml null or empty, setting locale to default locale : en_US 04:06:18,015 INFO [StartupServletContextListener] ServletContext 'D:\servers\jboss-4.0.5.GA\server\default\.\ tmp\deploy\tmp17588bpmshell.ear-contents\bpmshell-exp.war\' initialized. 04:06:18,015 INFO [StartupServletContextListener] Serialization provider : class org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory 04:06:18,125 INFO [EARDeployer] Started J2EE application: file:/D:/servers/jboss-4.0.5.GA/server/default/deploy/bpmshell.ear 04:06:18,203 INFO [Events] no events.xml file found 04:06:18,234 INFO [Pages] no pages.xml file found
My web.xml as follows:
<?xml version="1.0" ?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <!-- Seam --> <listener> <listener-class>org.jboss.seam.servlet.SeamListener</listener-class> </listener> <!-- Propagate conversations across redirects --> <filter> <filter-name>Seam Exception Filter</filter-name> <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class> </filter> <filter-mapping> <filter-name>Seam Exception Filter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <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>*.jsfx</url-pattern> </filter-mapping> <listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> </listener> <!-- MyFaces --> <listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> </listener> <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>com.sun.faces.validateXml</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>com.sun.faces.verifyObjects</param-name> <param-value>true</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>*.jsfx</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> <role-name>NONE</role-name> </auth-constraint> </security-constraint> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.jsfx</welcome-file> <welcome-file>index.xhtml</welcome-file> <welcome-file>index.jspx</welcome-file> </welcome-file-list> </web-app>
I don't know if anyone encountered such a problem before. I really need help because I am stuck!
Note that this problem happened when I upgraded to jboss-seam-1.1.0.GA.
Is there any file or tag that I should add in any file related to the latest seam framework?
Thank you in advance,
Regards
Lara