Tomcat blankpage for default error page
Posted
by praspa
on Stack Overflow
See other posts from Stack Overflow
or by praspa
Published on 2010-04-13T11:59:26Z
Indexed on
2010/04/13
12:03 UTC
Read the original article
Hit count: 348
First off, I'm using Tomcat 5.5 and my .jsp's live in /webapps/foo/bar/*.jsp.
I followed the directions here to set up a 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 dropped copies of a test error.html file into each of the dirs (I wasn't sure where /error.html was referring to):
/webapps/
/webapps/foo/
/webapps/foo/bar/
Whenever I attempt to access a non-existent page in a browser at url's /foo/missingpage.html or /foo/bar/missingpage.html I'm redirected to my error page that exists in /foo/error.html.
However, attempting to access a non-existent page in a browser at url /missingpage.html yields a blankpage. Or any permutation of /missingDir/missingfile.html will also yield a blank page. Any suggestions? Am I missing some extra configuration?
Thanks
PR
© Stack Overflow or respective owner