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
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>