> Exception handling can be configured in WEB-INF/web.xml

This suggestion seems to hold a lot of promise for error handling.  The only
problem is that I have not been able to get it to work.  I have the
following stanza in the web-app container of my web.xml file:

 <error-page>
  <exception-type>java.lang.Throwable</exception-type>
  <location>/errors.jsp</location>
 </error-page>

It is my understanding that the above is a catch-all that will trap any
error.

I also have the following at the top of my errors.jsp file:

<%@ page isErrorPage="true" %>

It's my understanding that the above 2 things is all that is required.

One piece of documentation that I have been reading (
http://wiki.metawerx.net/wiki/Web.xml.ErrorPage} states:

Tomcat will check your web.xml <http://wiki.metawerx.net/wiki/Web.xml> for
these elements before displaying it's default error page.

That almost sounds like the display of the error page specified in web.xml
won't get triggered unless the default Tomcat error page would have been
displayed.  IOW, it sort of suggests that it wouldn't work with errors that
would not trigger the display of the Tomcat default error page (such as Java
exceptions)  I don't know if that is the case or not; but, it sure doesn't
seem to be working.

Thanks for your suggestion.  As I say, I think that it holds a lot of
promise if I could just get it to work.

         ... doug

Reply via email to