(I tried this question on the Tomcat list, and got no response. Maybe it's
more of a JSP question? Thanks in advance.)
>Can someone explain the relationship between the <error-page> element in
>my webapp's WEB.XML versus the "errorPage" attribute of the page directive
>within a JSP? I'm trying to create a single error page that handles any
>exceptions generated by the JSPs within my webapp, without having to name
>the error page in every JSP.
>
>To start with, I added the following to my web app's WEB.XML to indicate a
>"catch all" error page for the app:
>
> <error-page>
> <exception-type>java.lang.Exception</exception-type>
> <location>/error.jsp</location>
> </error-page>
>
>I also marked ERROR.JSP as an error page by including the following at the
>top (note the isErrorPage attribute):
>
> <%@ page contentType="text/html; charset=ISO-8859-1" buffer="64kb"
> isErrorPage="true" %>
>
>Unfortunately, when trying to access the "exception" object in ERROR.JSP,
>I get a NullPointerException, as though it doesn't exist.
>
>Since I thought this should work, I must be missing something? (I'm using
>Tomcat 4.0.4, by the way.)
>
>Thanks.
>
>Jay
-- Jay Burgess [[EMAIL PROTECTED]]
Digital Archaeology Corporation
(913) 438-9444 x154
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com