You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chong Yu Meng <ch...@cymulacrum.net> on 2003/03/13 07:48:46 UTC
error pages and web.xml
Greetings !
I'm having problems configuring error pages in Tomcat. I've written a
servlet called ErrorHandler that should handle any exceptions thrown by
my servlets. Inside the web.xml of my web application I specified :
<error-page>
<exception-type>javax.servlet.ServletException</exception-type>
<location>/ErrorHandler</location>
</error-page>
This does not work, and Tomcat still handles any exceptions thorwn by my
servlets. However, when I change the configuration to :
<error-page>
<error-code>500</error-code>
<location>/500.html</location>
</error-page>
This works. I tested my ErrorHandler servlet alone, and that seems to
work as well.
My question is : did I do something wrong ? Did I specify the right
<exception-type> to handle 500 errors ?
I'm using Tomcat 4.1.18, Apache 1.3.27 and IBM Java2 SDK 1.3.1
Any help will be greatly appreciated !
Regards,
pascal chong
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org