John Keyes wrote:
> Is it possible to get the jsp page referred to by errorPage to handle
> these exceptions ?
It depends on the servlet engine you're using, but a JSDK 2.1-compliant engine
should let you set the request attribute named by the constant
PageContext.EXCEPTION.
So in your servlet, when you detect an error, do something like:
request.setAttribute(PageContext.EXCEPTION, new Exception("File not found"));
Then forward to the error page:
getServletContext().getRequestDispatcher("/my/errorPage.jsp").forward(request,
response);
Wes
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html