It's not a really clean solution but you can do it like this :

try{
.....
}catch(Exception e){
    RequestDispatcher rd = getServletContext().getRequestDispatcher("MyErrorPage.jsp");
    request.setAttribute("javax.servlet.jsp.jspException", e);
    rd.forward(request, response);
}

I tested it and it works.

arno

> -----Message d'origine-----
> De:   Brendan McKenna [SMTP:[EMAIL PROTECTED]]
> Date: lundi 1 octobre 2001 15:35
> �:    [EMAIL PROTECTED]
> Objet:        Servlets and JSP Error Pages
> 
> Hi,
> 
>       Is there a way to route exceptions thrown in servlets to a JSP 
> error page?
> 
> 
>                                               Brendan
> -- 
> Brendan McKenna                              Email: [EMAIL PROTECTED]
> Development Strategist                       Phone: +353-61-338177
> Taringold Ltd.                               Fax:   +353-61-338065
> 

Reply via email to