First, I use Tomcat 5.5 and my .jsp live in / webapps / foo / bar / *. jsp.
I followed the instructions here to set the default 404 error page. In my TOMCAT_HOME / conf / web.xml, I entered:
<error-page>
<error-code>404</error-code>
<location>/error.html</location>
</error-page>
I dumped copies of the error.html test file into each of the dirs (I was not sure where /error.html was referenced):
/webapps/
/webapps/foo/
/webapps/foo/bar/
Whenever I try to access a non-existent page in the browser at url / foo / missingpage.html or /foo/bar/missingpage.html, I am redirected to the error page that exists in /foo/error.html.
url/missingpage.html . /missingDir/missingfile.html . - ? ?
PR