If the errorPage attribute references another JSP, make sure that page has:

<%@ page isErrorPage="true" %>

Otherwise, attempting to use the implicit exception object *should* result in 
an error.

I'm guessing that the javax.servlet.error.* request attributes will only get 
populated if you make use of web.xml error pages. In other words, no errorPage 
attribute in the page directive but an <error-page> entry in web.xml for the 
appropriate exception type.

Quoting Ricardo Moral <[EMAIL PROTECTED]>:

> There are two valves used to handle errors. The first
> one is the ErrorDispatcherValve. This is the valve
> that will forward the request to the error page if
> there is a uncaught exception. The second valve is the
> ErrorReportValve wich is the last valve on the list of
> valves of a Host and is used to generate a error
> report in HTML. 
> 
> You don't need to add this valves by hand because they
> are added by the start method of the StandardHost
> implementation. If you are using other implementation
> of the Host interface you must add this valves
> yourself.
> 
> The exception of JSP's are stored under the attibute
> 'javax.servlet.jsp.jspException' of the request. But
> you must access this value directly using the
> 'exception' variable already declared on the context
> of the error page.
> 
> 
> --- Jan Kunzmann <[EMAIL PROTECTED]> wrote:
> > Hi there,
> > 
> > I've a problem with JSP error handling.
> > 
> > I tried to make custom error pages with the
> > <% page errorPage="..." %> element. If an error
> > occurs during the 
> > execution of my jsp page, the error page is called,
> > but the 
> > javax.servlet.error.* attributes do not contain any
> > values.
> > 
> > I looked into the Tomcat 4.0 source and found a
> > valve called 
> > ErrorDispatcherValve. Has it something to do with
> > jsp error handling? I 
> > tried to include the valve with <Valve...> and with
> > <Host 
> > errorReportingValve="">, but the error page still
> > reports the attributes 
> > to be null.
> > 
> > I use Tomcat 4.0.4 from the Debian distribution with
> > marginal chances in 
> > server.xml.
> > 
> > Thanks in advance,
> > Jan
> > 
> > 
> > --
> > To unsubscribe, e-mail:  
> > <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:tomcat-user-help@;jakarta.apache.org>
> > 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> HotJobs - Search new jobs daily now
> http://hotjobs.yahoo.com/
> 
> --
> To unsubscribe, e-mail:  
> <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:tomcat-user-help@;jakarta.apache.org>
> 


-- 
Kris Schneider <mailto:kris@;dotech.com>
D.O.Tech       <http://www.dotech.com/>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>

Reply via email to