This content has been marked as final.
Show 3 replies
-
1. Re: How to redirect the none existing page to 404 page.
ppitonak Nov 24, 2011 12:55 PM (in response to hantsy)Hi,
I set following in my web.xml and it works nice:
<error-page>
<error-code>404</error-code>
<location>/faces/error/404.xhtml</location>
</error-page>
Regards,
Palo
-
2. Re: How to redirect the none existing page to 404 page.
hantsy Nov 24, 2011 8:18 PM (in response to ppitonak)I also set the 404 and 500 in the web.xml, but it does not work for jsf pages.
If I browsed anther non existing url, such as http://localhost:8080/test/XXXXXX, which was not processed by Faces Servlet.
It will redirect to 404 page.
-
3. Re: How to redirect the none existing page to 404 page.
hantsy Dec 8, 2011 10:26 AM (in response to hantsy)I read the java doc of FacesFileNotFoundException, it said it will throw 404 or 500 error code to client...but I can not catch a FacesFileNotFoundException in my JSF ExceptionHandler, it is a generic FacesException there.