j***@usmint.treas.gov
2006-11-06 22:40:30 UTC
I have set up a system error page by adding the following to web.xml:
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/customError.jsp</location>
</error-page>
It appears that there is already an error view called "GenericSystemError" that is registered in VIEWREG and gets invoked if you call a Servlet that does not exist. For example requests to http://servername/webapp/wcs/stores/servlet/DoesNotExistServlet
will display the GenericSystemError view but if I call a page that does not exist with .jsp extension the page customError.jsp is invoked.
What I would like to do is forward from customError.jsp to the view GenericSystemError (so I don't have two versions of an error page) but I can't figure out how to forward to the view. Can anyone tell me how to do this?
NOTE: I can't directly forward to the page GenericSystemError.jsp because I get an exception "User Not Authorized", but I should be able to forward to the VIEW.
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/customError.jsp</location>
</error-page>
It appears that there is already an error view called "GenericSystemError" that is registered in VIEWREG and gets invoked if you call a Servlet that does not exist. For example requests to http://servername/webapp/wcs/stores/servlet/DoesNotExistServlet
will display the GenericSystemError view but if I call a page that does not exist with .jsp extension the page customError.jsp is invoked.
What I would like to do is forward from customError.jsp to the view GenericSystemError (so I don't have two versions of an error page) but I can't figure out how to forward to the view. Can anyone tell me how to do this?
NOTE: I can't directly forward to the page GenericSystemError.jsp because I get an exception "User Not Authorized", but I should be able to forward to the VIEW.