From the servlet specification:
"The error page mechanism described does not intervene when errors
occur in
servlets invoked using the RequestDispatcher."
Do you use Struts? With Struts, the request is *dispatched* to JSP
page, therefore you will not see the error page set up in web.xml. Try
accessing your JSP page without going through the action servlet, so
instead of typing
http://localhost:8080/myapp/test.do, type
http://localhost:8080/myapp/test.jsp. You can use <global-exceptions>
in struts-config.xml to achieve what you tried to do with <error-page>
in web.xml.
Jonni Gani
bj**@yahoo.com (Bruce Sams) wrote in message news:<1b**************************@posting.google. com>...
Hello,
I am running Tomcat 4.x and have tried to set global error handling
using the following kind of entries in the web.xml file. But there is
no redirection and I always end up with the tomcat generated error
page in the browser.
Does anyone have a solution to this problem?
<error-page>
<error-code>500</error-code>
<location>/weberror.jsp</location>
</error-page>
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/weberror.jsp</location>
</error-page>
Thanks
Bruce Sams