"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
   <error-page>
      <error-code>503</error-code>
      <location>/error/maintenance.html</location>
    </error-page>


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]

Reply via email to