You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Laurent Cottereau <la...@cottereau.name> on 2013/04/22 16:12:51 UTC
Exception doesn't get redirected to error-page when
myfaces.ERROR_HANDLING is set to false
Hello everyone. This question was also posted on
http://stackoverflow.com/questions/16149292/exception-doesnt-get-redirected-to-error-page-when-myfaces-error-handling-is-se
I have implemented an error JSF page which gives basic information to
users. It is triggered by the <error-page> tag in my web.xml
<error-page>
<location>/error</location></error-page>
This works fine with a 404 error. In order to use it also for exceptions, I
have disabled error handling by MyFaces 2.1.10 in web.xml
<context-param>
<param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
<param-value>false</param-value></context-param>
In
https://cwiki.apache.org/confluence/display/MYFACES/Handling+Server+Errors#HandlingServerErrors-Provideanerrorpageit
says that an Exception should trigger a redirection to
/error. However, when I throw a RuntimeException in my code, it shows in
the logs but all the user gets is a blank page.
I can't seem to figure out why and how to get (if possible) the expected
behaviour.
The application server is tomcat-7.0.35
Any idea ? Thank you in advance for your help
--
Laurent Cottereau
laurent@cottereau.name
http://laurent.cottereau.name