I set following in my web.xml and it works nice:
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.
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.