Hi,
i've tried to forward from a servlet to a JSP error page (<%@ page isErrorPage="true"
%>) after an exception occured. To
forward the exception from the servlet to the JSP i've put it into the
HttpServletRequest instance as demanded in the
JSP 1.1 spec. with a simple setAttribute:
public void doGet(HttpServletRequest aRequest, HttpServletResponse aResponse) {
:
catch( Exception e ) {
aRequest.setAttribute("javax.servlet.jsp.jspException", e);
}
:
}
JSP 1.1 spec.:
#The offending java.lang.Throwable describing the error that occurred is stored in the
#javax.ServletRequest instance for the client request using the putAttribute()
#method, using the name �javax.servlet.jsp.jspException�.
But the code generated by the JSP compiler is the following:
:
Throwable exception = (Throwable)request.getAttribute("exception");
:
So the exception is not found in the JSP because of the different attribute name.
Did i misinterpreting something?
Georg