You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Arend P. van der Veen" <ap...@att.net> on 2007/09/10 22:02:42 UTC

Default error page

Hi,

I have been looking through the documentation to see if it is possible 
to change the default error pages in tomcat.  For example, I currently 
have entries like

<error-page>
       <error-code>404</error-code>
       <location>/error.html</location>
</error-page>

in my web.xml file.  The problem is that I must include seperate entries 
for each error-code.  Is there a way of catching all of the errors with 
one error code?  I have the same question for exception catching.

The main reason why this is important to me is that I must hide the 
internals of my application from my users.  One part of that task is to 
replace the error pages with custom ones.

Thanks,
Arend van der Veen
apvanderveen@acm.org


---------------------------------------------------------------------
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: Default error page

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Arend,

Arend P. van der Veen wrote:
> The problem is that I must include seperate entries
> for each error-code.  Is there a way of catching all of the errors with
> one error code?

No.

> I have the same question for exception catching.

Yes:

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

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG5a1n9CaO5/Lv0PARAtR6AKCGRGLxw3GHfTn7AxgqNFgyLANM3ACcDDFk
1WVwHdXOSmCkk3PJi/2jARU=
=ZBBb
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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