With nothing configured for errors, I get a Tomcat error page:

HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it
from fulfilling this request.
exception
javax.servlet.ServletException: org.xml.sax.SAXParseException: blah, blah...
...
root cause
com.example.DAOException: org.xml.sax.SAXParseException: blah, blah...
...
Caused by: org.xml.sax.SAXParseException: blah, blah...

The code that causes it looks like this:

     try {
          ...
     } catch ( Exception ex ) {
         throw new DAOException( ex );
     }

Can someone explain why, if I put this in web.xml,

  <error-page>
      <exception-type>javax.servlet.ServletException</exception-type>
      <location>/WEB-INF/jsp/error/exception.jsp</location>
   </error-page>

it does NOT display the .jsp and instead shows the same thing as above with
all the stack traces?

I also tried configuring it for java.lang.Exception, but no luck there,
either.

I _can_ get a good error page if I configure it for the 'root cause'
DAOException, I'm just confused as to why I can't trap the ServletException.

Thank you,
Wendy Smoak
http://wiki.wendysmoak.com/cgi-bin/wiki.pl?TomcatErrorPage


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to