Struts 1 ExceptionHandler doesn't work for Filter
I want to define a global exception handler for the Struts 1.x web
application. I do it in the struts-config.xml like this:
<global-exceptions>
<exception
key="some.key"
type="com.example.DatabaseException"
handler="com.example.DatabaseExceptionHandler"
path="error.jsp" />
</global-exceptions>
The exception occurs in AuthenticationFilter, not in Struts Action. I
think this is the reason why DatabaseExceptionHandler is never called. But
how to overcome this limitation? I want to be able to catch all the
exceptions, not only those, raised by Struts Actions.
No comments:
Post a Comment