Patches item #532239, was opened at 2002-03-19 17:31
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376687&aid=532239&group_id=22866

Category: JBossServer
Group: v3.0 Rabbit Hole (unstable)
Status: Open
Resolution: None
Priority: 5
Submitted By: Stephen Davidson (northgorky)
Assigned to: Nobody/Anonymous (nobody)
Summary: PageContext does not do Throwable

Initial Comment:
When compiling JSPs, the following is frequently added
to the generated Java file.
    [javac] /tmp/Builds/HRneXus/war/jsp/Error.java:266:
handlePageException(java.lang.Exception) in
javax.servlet.jsp.PageContext cannot be applied to
(java.lang.Throwable)
    [javac]       if (pageContext != null)
pageContext.handlePageException(t);
    [javac]                                           ^


The Inteface defined by Sun is;
PageContext.handlePageException(java.lang.Exception e)

This causes the java compiler to fail when precompiling
JSPs.

The following is the recommended patch;

> cvs diff -u
src/main/org/apache/jasper/compiler/JspParseEventListener.java
Index:
src/main/org/apache/jasper/compiler/JspParseEventListener.java
===================================================================
RCS file:
/cvsroot/jboss/contrib/jetty/src/main/org/apache/jasper/compiler/JspParseEventListener.java,v
retrieving revision 1.6
diff -u -r1.6 JspParseEventListener.java
---
src/main/org/apache/jasper/compiler/JspParseEventListener.java
     11 Mar 2002 05:28:56 -0000      1.6
+++
src/main/org/apache/jasper/compiler/JspParseEventListener.java
     19 Mar 2002 21:25:53 -0000
@@ -374,13 +374,21 @@
 
     private void generateFooter() throws JasperException {
        writer.popIndent();
-       writer.println("} catch (Throwable t) {");
+       writer.println("} catch (RuntimeException e) {");
        writer.pushIndent();
         writer.println("if (out != null &&
out.getBufferSize() != 0)");
         writer.pushIndent();
        writer.println("out.clearBuffer();");
        writer.popIndent();
-       writer.println("if (pageContext != null)
pageContext.handlePageException(t);");
+       writer.println("if (pageContext != null)
pageContext.handlePageException(e);");
+       writer.popIndent();
+       writer.println("} catch (Exception e) {");
+       writer.pushIndent();
+        writer.println("if (out != null &&
out.getBufferSize() != 0)");
+        writer.pushIndent();
+       writer.println("out.clearBuffer();");
+       writer.popIndent();
+       writer.println("if (pageContext != null)
pageContext.handlePageException(e);");
        writer.popIndent();
        writer.println("} finally {");
        writer.pushIndent();                          
                                                      
 

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376687&aid=532239&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to