I am trying to use a single error page for all exceptions which occur in my jsps, but I have not been able to get this to function properly. This is the relevant part of my web.xml:
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/error.jsp</location>
</error-page>
Now, if my
jsp throws a java.lang.Exception it works perfectly and redirects to error.jsp, the problem is that if my jsp throws a subclass of java.lang.Exception the redirect is not occuring. If I explicitly list the exception subclass in the web.xml the container redirects, but obviously I can't do this for all possible exceptions. I thought the problem might be related to throwing unchecked exceptions, but the redirect does not occur regardless of whether the subclass extends Exception or RuntimeException. Any help is appreciated.