Thanks Sean!  
The <error-page> <exception-type> was EXACTLY what I needed.  
Much appreciated.

Jay

> -----Original Message-----
> From: Sean Dockery [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 04, 2003 3:11 PM
> To: Tomcat Users List
> Subject: Re: web.xml error-page not working for 500 errors
> 
> 
> I would speculate that the 500 status code is being set 
> inside the default 
> exception handling code--which probably fall outside the error-page 
> forwarding mechanism.
> 
> Instead of triggering an exception, what happens when you use 
> HttpSessionResponse.setStatus(500) in a servlet?
> 
> I would not consider this to be a bug in Tomcat.  How does 
> Resin behave, 
> for example?
> 
> Perhaps a different solution that might work would be to 
> declare the following:
> 
> <error-page>
>    <exception-type>java.lang.Exception</exception-type>
>    <location>/general_error.html</location>
> </error-page>
> 
> See what that does for you...
> 
> At 15:05 2003-02-04, you wrote:
> 
> >I have configured my webapp to serve up error pages via the 
> web.xml file:
> >
> >     <error-page>
> >         <error-code>500</error-code>
> >         <location>/general_error.html</location>
> >     </error-page>
> >     <error-page>
> >         <error-code>404</error-code>
> >         <location>/general_error.html</location>
> >     </error-page>
> >
> >This works without a problem for 404 errors, but 500 errors (such as
> >NullPointerExceptions) are not redirecting to the 
> general_error.html page.
> >
> >Is there a reason for this or is it a bug in tomcat 4.0.4?
> >
> >Jay
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> 
> Sean Dockery
> [EMAIL PROTECTED]
> Certified Java Web Component Developer
> Certified Delphi Programmer
> SBD Consultants
> http://www.sbdconsultants.com
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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

Reply via email to