Custom 404 for non-existant contexts?
Is there a way to create a custom 404 error page for Tomcat for non-existant context paths? I know how to create a custom 404 error page within my application, but am running into an issue while I am redeploying my application. The users are able to access Tomcat, but since my application/context isn't yet deployed they are getting Tomcat's standard 404 error page and freak out. Is there anything I can do to customize it and make it a little more user friendly? Thanks, Eric - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Custom 404 for non-existant contexts?
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Eric B. > 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? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom 404 for non-existant contexts?
"Caldarale, Charles R" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> 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 503 /error/maintenance.html and put the /error/maintenance.html in the ROOT directory. Of course, the ugly part about this is that a) /error/maintenance.html is now accessible through my root app (unless otherwise protected), and I need to have a separate ROOT/error/maintenance.html for each individual Tomcat instance. I was hoping to be able to centralize the error msgs (as in httpd), but didn't have any success. I tried using a symlink to point my error/ folder to a central location, but Tomcat didn't follow the link. Not the prettiest soln, but functional. Would be nice if I could make it nicer tho. Thanks, Eric - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom 404 for non-existant contexts?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Eric, Eric B. wrote: | "Caldarale, Charles R" <[EMAIL PROTECTED]> wrote in message | news:[EMAIL PROTECTED] |>> 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 | | 503 | /error/maintenance.html | 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom 404 for non-existant contexts?
you;d have to custom do it http://people.apache.org/~fhanik/covalent-error-report-valve.jar Filip Eric B. wrote: Is there a way to create a custom 404 error page for Tomcat for non-existant context paths? I know how to create a custom 404 error page within my application, but am running into an issue while I am redeploying my application. The users are able to access Tomcat, but since my application/context isn't yet deployed they are getting Tomcat's standard 404 error page and freak out. Is there anything I can do to customize it and make it a little more user friendly? Thanks, Eric - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 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 > | > | 503 > | /error/maintenance.html > | > > 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? Hmmm - good question. Don't know why I didn't think of that. Would just modifying the ROOT/WEB-INF/web.xml work? I expected that I needed to modify the entire site's defaults since I didn't think that the root would suffice, but now that I think about it, your suggestion does sound much more logical. FYI, I did run a couple of tests to see if the site-wide would conflict with an individual application, but it seems that the individual application's settings will override it - however, only if specified. If not specified, then I can indeed forsee additional confusion occuring. Will take another look at that tomorrow. Thanks, Eric - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Custom 404 for non-existant contexts?
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Eric B. > Subject: Re: Custom 404 for non-existant contexts? > > Would just modifying the ROOT/WEB-INF/web.xml work? It should, since any unmatched context paths are given to the default app for processing (and usually a 404). This is different than creating a customized error page for a context that fails to deploy properly, which is what Filip's valve takes care of in addition to the non-existant context. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]