cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: [C1] Get TomCat to handle Errors & Exceptions?
Date Mon, 26 Mar 2001 15:20:10 GMT


Jeremy Quinn a écrit :
> 
> Dear All,
> 
> Reading the Servlet 2.2 spec, it appears that it should be possible to map
> HTTP error-codes and Java Exceptions to specific pages, in my context's
> web.xml.
> 
> I have been trying to set this up, with no success.
> 
> 1. Turn off internal error handling in cocoon.properties
> 
>                 handle.errors.internally = false
> 
> 2. Add error handlers in web.xml
> 
>                 <error-page>
>                         <error-code>500</error-code>
>                         <location>error500.html</location>
>                 </error-page>
> 
>                 <error-page>
>                         <exception-type>java.lang.NullPointerException</exception-type>
>                         <location>errorNPE.html</location>
>                 </error-page>
> 
> 3. Tried switching off TomCat's stacktrace in server.xml
> 
>                 <ContextManager debug="0" workDir="work" showDebugInfo="false" >
> 
> 4. Made an XSP page that throws a java.lang.NullPointerException
> 
> etc.
> 
> Never see my error pages.
> TomCat shows it's default error page
> TomCat loops indefinitely (cannot reproduce this result now ......)
> 
> Has anyone managed to get this working?
> What am I doing wrong?
> 
> Thanks for any help
> 

I'm using Tomcat 3.2.1, and I've found that it nicely uses error-page
directives.... if they are JSP's !! It just ignores simple HTML pages.

Renaming error500.html to error500.jsp (both file and web.xml element)
should be just what you need.

Hope this helps.
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message