I believe you can say: <error-page> <exception-type>java.lang.Throwable</exception-type> <location>/error.jsp</location> </error-page>
This would take care of any exceptions being thrown. As for error codes - you might need to hard code these (but it isn't very many). There could be a chance that the error codes are handled as exceptions - therefore the above would handle ALL errors. Mark O'Driscoll wrote: > Great. Just what I wanted! > > Now is there anyway to specify a single <error-page><error-code> set that > works for all error codes. I can't just say > > <error-page><location>/error.jsp</location></error-page> > > and hope that error.jsp gets caled for all error-code & exception errors > > > ----- Original Message ----- > From: "Tim Funk" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Wednesday, July 17, 2002 3:17 PM > Subject: Re: How do I determine the error code > > > >>Section 9.8 of Java Servlet Specification Version 2.3: >> >>A web application may specify that when errors occur, other resources in >>the application are used. These resources are specified in the >>deployment descriptor. If the location of the error handler is a servlet >>or a JSP, the following request attributes can be set: >>- javax.servlet.error.status_code >>- javax.servlet.error.exception_type >>- javax.servlet.error.message >>- javax.servlet.error.exception >>- javax.servlet.error.request_uri >> >>-Tim >> >>Mark O'Driscoll wrote: >> >>>Using the <error-page><error-code> directive in my web.xml, I am >> > redirecting > >>>errors & exceptions to one error page. I know I can query the exception >> > but > >>>how do I query the error that may have caused the page to be invoked. >>> >>>e.g. >>> >>>if I call response.sendError(234), how do I tell in CheckError.jsp that >> > the > >>>error that cased the page to be invoked was 234 (and any other >> > information). > >>>I don't want to have to put in a separate directive for each possible >> > error. > >>> >>> >>> >>>-- >>>To unsubscribe, e-mail: >> > <mailto:[EMAIL PROTECTED]> > >>>For additional commands, e-mail: >> > <mailto:[EMAIL PROTECTED]> > >>> >>> >> >> >>-- >>To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > >>For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > >> > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
