Tomcat is following the spec in this case.  The handling for
exceptions is defined to be separate from the handling for
"status" errors such as 404.  So <exception-type> applies to
the exeception handling and <error-code> applies to the
"status" error handling.  The spec doesn't state that
the exception handling should delegate to the "status" error
handling after assigning the 500 status code.  It simply
requires that the status code of the response generated
by the exception handling be 500.

Cheers,
Larry

> -----Original Message-----
> From: Ricky Leung [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 19, 2002 7:00 PM
> To: Tomcat Users List
> Subject: RE: error-page tag in web.xml
> 
> 
> Yes, with the exception-type, if I give a fully qualified 
> class name, it
> works.  Great!  Thanks.
> 
> However, the 500 error-code is still not working while 404 
> works, I searched
> everywhere and there doesn't seem to be any answer to that question.
> 
> %CATALINA_HOME%/logs/<severname>_log<date>.txt gives me the 
> exceptions which
> is great for debugging, but I was thinking it would be better 
> to be able to
> capture the 500 error and present a better page for the 
> customers however.
> 
> In any case, thanks for the info, at least I am steps closer 
> to what I want,
> at the least, I could just define most of the exception-types 
> that we get
> here, but if 500 works it would really simplify things a lot.
> 
> Ricky
> 
> -----Original Message-----
> From: Drew Cox [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 19, 2002 6:38 PM
> To: Tomcat Users List
> Subject: RE: error-page tag in web.xml
> 
> 
> Hey Ricky,
> 
> Struggling with similar issues to you, but might be able to 
> help here.  Your
> 
>   <exception-type>CompileException</exception-type>
> 
> should contain a fully qualified class name.  I have the 
> redirection working
> in Tomcat 4.0.2 with this.  I would also suggest checking the
> %CATALINA_HOME%/logs/<severname>_log<date>.txt log file, it 
> usually has more
> info if the redirection is failing.
> 
> Cheers
> Drew
> 
> -----Original Message-----
> From: Ricky Leung [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 19, 2002 2:30 PM
> To: Tomcat Users List
> Subject: error-page tag in web.xml
> 
> 
> I have the following in my web.xml and if I bring up a 
> non-existent page,
> Tomcat4 correctly parses and presents the er404.jsp page, 
> however, I have
> not been able to get the 500 and the exception ones working.  
> I always get
> the Tomcat Error report with the dreaded 500 - Internal 
> Server Error.  Any
> ideas?
> 
>     <servlet-mapping>
>         <servlet-name>StoreServlet</servlet-name>
>         <url-pattern>/store</url-pattern>
>     </servlet-mapping>
> 
>     <error-page>
>         <exception-type>CompileException</exception-type>
>         <location>/error/er500.jsp</location>
>     </error-page>
> 
>     <error-page>
>         <error-code>404</error-code>
>         <location>/error/er404.jsp</location>
>     </error-page>
> 
>     <error-page>
>         <error-code>500</error-code>
>         <location>/error/er500.jsp</location>
>     </error-page>
> 
> 
> Thanks,
> Ricky
> 
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
> 

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to