문제

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?

도움이 되었습니까?

해결책

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).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top