craigmcc 00/11/10 15:19:25
Modified: src/share/org/apache/jasper/runtime Tag: tomcat_32
PageContextImpl.java
Log:
When "redirecting" to the error page in handlePageException(), first try to
forward to the error page. If this fails because the response has already
been committed, do an include of the error page instead -- that way the user
gets at least some feedback on what is causing the problem.
Submitted by: Larry Isaacs <[EMAIL PROTECTED]>
Revision Changes Path
No revision
No revision
1.13.2.2 +8 -4
jakarta-tomcat/src/share/org/apache/jasper/runtime/PageContextImpl.java
Index: PageContextImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
retrieving revision 1.13.2.1
retrieving revision 1.13.2.2
diff -u -r1.13.2.1 -r1.13.2.2
--- PageContextImpl.java 2000/09/14 03:09:49 1.13.2.1
+++ PageContextImpl.java 2000/11/10 23:19:25 1.13.2.2
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
1.13.2.1 2000/09/14 03:09:49 larryi Exp $
- * $Revision: 1.13.2.1 $
- * $Date: 2000/09/14 03:09:49 $
+ * $Header:
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
1.13.2.2 2000/11/10 23:19:25 craigmcc Exp $
+ * $Revision: 1.13.2.2 $
+ * $Date: 2000/11/10 23:19:25 $
*
* ====================================================================
*
@@ -436,7 +436,11 @@
request.setAttribute("javax.servlet.jsp.jspException", e);
if (errorPageURL != null && !errorPageURL.equals("")) {
- forward(errorPageURL);
+ try {
+ forward(errorPageURL);
+ } catch (IllegalStateException ise) {
+ include(errorPageURL);
+ }
} // Otherwise throw the exception wrapped inside a ServletException.
else {
// Set the exception as the root cause in the ServletException
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]