pierred     00/11/13 17:04:26

  Modified:    jasper/src/share/org/apache/jasper/runtime
                        PageContextImpl.java
  Log:
  Port of improvement made in 3.2b7
  -----
  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
  1.5       +8 -4      
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/PageContextImpl.java
  
  Index: PageContextImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PageContextImpl.java      2000/10/16 17:25:44     1.4
  +++ PageContextImpl.java      2000/11/14 01:04:23     1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
 1.4 2000/10/16 17:25:44 craigmcc Exp $
  - * $Revision: 1.4 $
  - * $Date: 2000/10/16 17:25:44 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
 1.5 2000/11/14 01:04:23 pierred Exp $
  + * $Revision: 1.5 $
  + * $Date: 2000/11/14 01:04:23 $
    *
    * ====================================================================
    *
  @@ -452,7 +452,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]

Reply via email to