Re: custom error page not working

Splash Forums PrettyFaces Users custom error page not working Re: custom error page not working

#21389

I guess you are getting a 404 instead of a 500 error code now, correct? I think previously your requests did always hit the FacesServlet (*.jsf or /faces/*) and Mojarra is throwing this exception if the page does not exist. But now your request won’t hit the FacesServlet because the URL doesn’t match the mapping of the FacesServlet. So you are just getting a 404 error, which is the more correct answer according to HTTP.

You could try to map the 404 error page by doing something like this:

<error-page>
<error-code>404</error-code>
<location>/error/404</location>
</error-page>