I have set up web.xml so that anything that's java.lang.Throwable (i.e. any uncaught exceptions or errors) will forward to an error page. However, for AJAXified components, exceptions dont get routed to the error page via this mechanism.
The test case I have is a simple CommandButton
tied to an action method that always throws a RuntimeException
. It seems like the best practice would be to have the action method catch the exception and add a FacesMessage
of type error severity. Is this what people do? Is there a way to configure JSF so that if an AJAXified component's backing bean method throws an exception that the error page can be shown?