luehe       2005/02/25 09:45:59

  Modified:    jasper2/src/share/org/apache/jasper/runtime
                        PageContextImpl.java
  Log:
  Fixed 31659 ("Page context not fully populated for Exception if using 
app-wide error page")
  
  Revision  Changes    Path
  1.64      +7 -5      
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.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- PageContextImpl.java      25 Feb 2005 17:32:31 -0000      1.63
  +++ PageContextImpl.java      25 Feb 2005 17:45:59 -0000      1.64
  @@ -559,26 +559,28 @@
       public ServletRequest getRequest() { return request; }
       public ServletResponse getResponse() { return response; }
   
  +
       /**
        * Returns the exception associated with this page
        * context, if any.
        * <p/>
  -     * Added wrapping for Throwables to avoid ClassCaseException:
  +     * Added wrapping for Throwables to avoid ClassCastException:
        * see Bugzilla 31171 for details.
        *
        * @return The Exception associated with this page context, if any.
        */
       public Exception getException() {
  -        Throwable exc = (Throwable) request.getAttribute(EXCEPTION);
  +        Throwable t = JspRuntimeLibrary.getThrowable(request);
   
           // Only wrap if needed
  -        if((exc != null) && (! (exc instanceof Exception))) {
  -            exc = new JspException(exc);
  +        if((t != null) && (! (t instanceof Exception))) {
  +            t = new JspException(t);
           }
   
  -        return (Exception) exc;
  +        return (Exception) t;
       }
   
  +
       public Object getPage() { return servlet; }
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to