wood burning stoves 2.0*
The moose likes JSF and the fly likes Extension Mapping Not Working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Extension Mapping Not Working" Watch "Extension Mapping Not Working" New topic
Author

Extension Mapping Not Working

James Ellis
Ranch Hand

Joined: Oct 14, 2004
Posts: 205
I cannot get a simple JSF app to work. Specifically, if I include the following in the web.xml file:



And then i have the following directory structure:

webapps/simplejsf/test.jsp

When I type in the URL http://someserver.com/simplejsf/test.jsf the page is not rendered. I get a page that says

"Not Found

The requested URL /simplejsf/test.jsf was not found on this server."

However I can go directly to http://someserver.com/simplejsf/test.jsp and the file is displayed.

Are there any glaring issues here? I have tried using "/faces/*" and that doesn't seem to work either. I can't tell if the servlet FacesServlet is being entered at all...and since I don't have it's source code I can't really debug it...
James Ellis
Ranch Hand

Joined: Oct 14, 2004
Posts: 205
Update:

I found out that when i change the url-pattern in web.xml to:



When I type in the URL http://someserver.com/simplejsf/faces/test.jsp the page IS rendered.

Why would this url-pattern work when the extension mapping does not? Are there any issues with Sun's Implementation (1_1_01) that don't allow extension mapping?
James Ellis
Ranch Hand

Joined: Oct 14, 2004
Posts: 205
After much research, I have found out that the problem had nothing to do with JSF. Requests were being routed through Apache and Apache was blocking anything that wasn't either a servlet or JSP, so requests to *.jsf were being blocked at the Apache level.

I guess I should have figured this out when the access logs weren't showing 404 errors in tomcat. But then again, neither were requests to http://someserver/com/doesnotexist.htm so I figured this was some kind of setting with the logging....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Extension Mapping Not Working