Set Error-Pages for all Applications in Tomcat
Posted
by phisch
on Server Fault
See other posts from Server Fault
or by phisch
Published on 2010-03-23T08:57:34Z
Indexed on
2010/03/23
9:03 UTC
Read the original article
Hit count: 304
tomcat
|errordocument
I'm trying to set up custom error pages in tomcat 6, because I don't want the default ones to show up. My error pages are static html, no jsp or anything dynamic.
I know how to do this through the web.xml in each application but I'd prefere to setup the error pages only once for the entire server.
I tried to add the following fragment to the global web.xml (in conf), but no matter what I add under location, it does not show.
<error-page>
<error-code>404</error-code>
<location>/404.html</location>
</error-page>
What do I need to do to gobally define custom error pages? Thanks!
© Server Fault or respective owner