costin      2002/11/07 15:33:39

  Modified:    jasper2/src/share/org/apache/jasper/runtime
                        PageContextImpl.java
  Log:
  Thanks for the fix. I added the test for newException!=oldException
  after testing, just before commit.
  
  The oldException is allways null, since the attribute is set later.
  Now it should be ok, and deal with errors in the error page.
  
  Revision  Changes    Path
  1.34      +5 -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.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- PageContextImpl.java      7 Nov 2002 21:11:40 -0000       1.33
  +++ PageContextImpl.java      7 Nov 2002 23:33:38 -0000       1.34
  @@ -569,7 +569,6 @@
            // part of forwarding the request to the error page, from
            // throwing it if the response has not been committed (the response
            // will have been committed if the error page is a JSP page).
  -            Object 
origException=request.getAttribute("javax.servlet.error.exception");
   
            request.setAttribute("javax.servlet.jsp.jspException", t);
            request.setAttribute("javax.servlet.error.status_code",
  @@ -588,8 +587,8 @@
   
               Object 
newException=request.getAttribute("javax.servlet.error.exception");
   
  -            if ((origException == null) || 
  -                ((newException != null) && (newException == origException))) {
  +            // t==null means the attribute was not set.
  +            if( (newException!= null) && (newException==t) ) {
                   request.removeAttribute("javax.servlet.error.exception");
               }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>

Reply via email to