...
Take a look at MyFaces Core source code, to know in detail how ExceptionHandler implementations works.
MyFaces Core provide a custom ExceptionHandler to deal with exceptions and provide detailed information about it. Since 2.0.8/2.1.2 this is disabled on Production environments unless it enabled on web.xml file. Don't forget to provide your custom error page in this scenario, to prevent show more information than necessary.
Code Block | ||||
---|---|---|---|---|
| ||||
<context-param>
<param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
<param-value>true</param-value>
</context-param>
<!-- if you want to use a different resource template file than
"META-INF/rsc/myfaces-dev-error.xml" this param let you configure
it. (since 1.2.4-SNAPSHOT and 1.1.6-SNAPSHOT)-->
<context-param>
<param-name>org.apache.myfaces.ERROR_TEMPLATE_RESOURCE</param-name>
<param-value>META-INF/rsc/custom-dev-error.xml</param-value>
</context-param>
|
The default ExceptionHandler in Production stage or when myfaces error handling is disabled just throw an exception. So you can still setup an error page adding something like this in your web.xml file:
Code Block | ||||
---|---|---|---|---|
| ||||
<error-page>
<error-code>500</error-code>
<location>/somepage.jsp</location>
</error-page>
|
...