Author: remy.maucherat(a)jboss.com
Date: 2012-03-14 06:13:39 -0400 (Wed, 14 Mar 2012)
New Revision: 2000
Modified:
trunk/java/org/apache/jasper/compiler/Generator.java
trunk/webapps/docs/changelog.xml
Log:
Port 52776: Fix cleanup after JspFragment.invoke
Modified: trunk/java/org/apache/jasper/compiler/Generator.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/Generator.java 2012-03-09 21:44:26 UTC (rev
1999)
+++ trunk/java/org/apache/jasper/compiler/Generator.java 2012-03-14 10:13:39 UTC (rev
2000)
@@ -2098,9 +2098,6 @@
out.println(");");
}
- // Restore EL context
-
out.printil("jspContext.getELContext().putContext(JspContext.class,getJspContext());");
-
n.setEndJavaLine(out.getJavaLine());
}
@@ -4186,6 +4183,7 @@
out.printil("}");
out.printil("try {");
out.pushIndent();
+ out.printil("Object _jspx_saved_JspContext =
this.jspContext.getELContext().getContext(javax.servlet.jsp.JspContext.class);");
out.printil("this.jspContext.getELContext().putContext(JspContext.class,this.jspContext);");
out.printil("switch( this.discriminator ) {");
out.pushIndent();
@@ -4198,6 +4196,10 @@
}
out.popIndent();
out.printil("}"); // switch
+
+ // restore nested JspContext on ELContext
+
out.printil("jspContext.getELContext().putContext(javax.servlet.jsp.JspContext.class,_jspx_saved_JspContext);");
+
out.popIndent();
out.printil("}"); // try
out.printil("catch( Throwable e ) {");
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2012-03-09 21:44:26 UTC (rev 1999)
+++ trunk/webapps/docs/changelog.xml 2012-03-14 10:13:39 UTC (rev 2000)
@@ -27,6 +27,13 @@
</fix>
</changelog>
</subsection>
+ <subsection name="Jasper">
+ <changelog>
+ <fix>
+ <bug>52776</bug>: Fix cleanup after JspFragment.invoke. Sumitted by
Karl von Randow. (markt)
+ </fix>
+ </changelog>
+ </subsection>
</section>
<section name="JBoss Web 7.0.12.Final (remm)">
Show replies by date