Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 29278 invoked from network); 25 Feb 2005 17:46:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 25 Feb 2005 17:46:07 -0000 Received: (qmail 44381 invoked by uid 500); 25 Feb 2005 17:46:01 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 44336 invoked by uid 500); 25 Feb 2005 17:46:01 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 44316 invoked by uid 500); 25 Feb 2005 17:46:01 -0000 Received: (qmail 44312 invoked by uid 99); 25 Feb 2005 17:46:00 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Fri, 25 Feb 2005 09:46:00 -0800 Received: (qmail 29231 invoked by uid 1399); 25 Feb 2005 17:45:59 -0000 Date: 25 Feb 2005 17:45:59 -0000 Message-ID: <20050225174559.29230.qmail@minotaur.apache.org> From: luehe@apache.org To: jakarta-tomcat-jasper-cvs@apache.org Subject: cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime PageContextImpl.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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. *

- * 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: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org