I've noticed that JSF 1.2. does not return error page when an exception was thrown in actionListener method but does return error page when an exception was thrown in action method. Why is that? Can it return error page in both cases?
+1
A:
Any exception which is thrown in a FacesEvent
listener method is silently caught and wrapped in a AbortProcessingException
and logged to the console. That's just as per the specification.
The ActionEvent
listener method (as any other FacesEvent
listener method) has no responsibility for navigational tasks. The real action method has. Generally, the action listener method should only be used whenever you want to observe an action invoke, not to execute some business task (which affects the response).
BalusC
2010-10-10 04:28:37