I've looked at the translated JSP page of
Tomcat,
and it catches a Throwable in its _jspService() method and forwards it.
I think that's why you are redirected to the error page associated to Throwable exceptions.
The spec says :
The Web application may have declared error pages using the exceptiontype
element. In this case the container matches the exception type by comparing
the exception thrown with the list of error-page definitions that use the
exception-type element. A match results in the container returning the resource
indicated in the location entry.
The closest match in the class heirarchy wins So even with Throwable declared in web.xml, it should be ok.
I'm confused too. Maybe it's a bad idea to declare the Throwable error handling in web.xml