luehe 2002/09/19 17:45:26
Modified: jasper2/src/share/org/apache/jasper/runtime
PageContextImpl.java
Log:
Fixed 12638: ${pageContext.errorData.throwable.message} throws an error
Revision Changes Path
1.20 +14 -6
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java
Index: PageContextImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- PageContextImpl.java 29 Aug 2002 02:04:21 -0000 1.19
+++ PageContextImpl.java 20 Sep 2002 00:45:26 -0000 1.20
@@ -529,15 +529,23 @@
public void handlePageException(Throwable t)
throws IOException, ServletException
{
- // set the request attribute with the Throwable.
- request.setAttribute("javax.servlet.jsp.jspException", t);
-
if (errorPageURL != null && !errorPageURL.equals("")) {
+
+ // Set request attributes
+ request.setAttribute("javax.servlet.jsp.jspException", t);
+ request.setAttribute("javax.servlet.error.exception", t);
+ request.setAttribute("javax.servlet.error.status_code",
+ new Integer(HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
+ request.setAttribute("javax.servlet.error.request_uri",
+ ((HttpServletRequest) request).getRequestURI());
+ request.setAttribute("javax.servlet.error.servlet_name",
+ config.getServletName());
try {
forward(errorPageURL);
} catch (IllegalStateException ise) {
include(errorPageURL);
}
+
} else {
// Otherwise throw the exception wrapped inside a ServletException.
// Set the exception as the root cause in the ServletException
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>