tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Custom 404 for non-existant contexts?
Date Wed, 06 Feb 2008 23:15:21 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eric,

Eric B. wrote:
| "Caldarale, Charles R" <Chuck.Caldarale@unisys.com> wrote in message
|
news:2828B04F0113CD468E6D1D51DF4362A404CC2281@USEA-EXCH2.na.uis.unisys.com...
|>> Subject: Custom 404 for non-existant contexts?
|>>
|>> Is there a way to create a custom 404 error page for Tomcat
|>> for non-existant context paths?
|
|> What happens if you declare a custom error page for the ROOT (default)
|> webapp?
|
| Yeah - that's pretty much the only thing I managed to figure out.  I
updated
| the conf/web.xml file to include
|    <error-page>
|       <error-code>503</error-code>
|       <location>/error/maintenance.html</location>
|     </error-page>

Note that you have modified the default web.xml for all webapps, and not
the ROOT webapp. This may have unintended consequences for other web
applications.

| and put the /error/maintenance.html in the ROOT directory.

If you have a ROOT directory, why not use ROOT/WEB-INF/web.xml instead
of hacking the site-wide defaults?

- -chris

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

iEYEARECAAYFAkeqP4kACgkQ9CaO5/Lv0PDiegCfd31lEnt3hmfoV2oxBAgKAOPv
idMAn1MpbGilhVIDY86VC2dszx36ncvQ
=kjW0
-----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


Mime
View raw message