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]

Reply via email to