You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by sa...@twinix.com on 2007/08/23 17:20:56 UTC

Re: A Global Error Page (JSP or JSF)

I have configured a servlet to display an error message and a stack trace for 500 errors 9defined in web.xml). It works sometimes and not at others? By this i mean some 500 errors are caught and reported the others just cause an error and failure.


In Response To: 

Does anybody have an example of global JSP (or JSF) error page that can be used to catch 500 errors genertaed by either servlets or jsps?

Thanks.


 Sent from Techienuggets Netbeans IDE Forum: http://www.techienuggets.com/Detail?tx=11104

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: A Global Error Page (JSP or JSF)

Posted by Gregor Schneider <rc...@googlemail.com>.
try to put something like this into your web.xml (i hope that is what
you've been asking for):

<error-page>
    	<exception-type>java.lang.Throwable</exception-type>
    	<location>/errorPages/generalError.html</location>
</error-page>

That page should just display some message like "general error
occured, please report to webmaster... ". The error itself you then
should find in your logs.

Cheers

Gregor
-- 
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org