It's too bad you couldn't forward that to an Action, which could then
forward it to a custom page, or rethrow so a Struts exception handler could
grab it.

-----Original Message-----
From: Zhang, Larry (L.) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 30, 2003 3:13 PM
To: Struts Users Mailing List
Subject: configure default error page in web.xml


HI,

I have a request to catch a Java Exception in the servlet and display an
error page. The functionality requires that we display different error
message for different exception.

A way to do this is to put try and catch logic in servlet, and if an
Exception is caught, I do
request.setAttribute("javax.servlet.jsp.jspExcetion",e), and then forward to
jsp error page, where we check the type of exception implicit object. Based
on this type, we display different error message. This is fine, but we are
not going to use this approach.

The other way is to configure web.xml. We can configure an error page for
specific Java exception. If the specific exception is raised to the web
container, the configured error page will get called. My question is that is
there any body  doing this way successfully?

Thanks.

Larry Zhang


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to