Author: kkolinko
Date: Tue Apr 20 14:35:33 2010
New Revision: 935941
URL: http://svn.apache.org/viewvc?rev=935941&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42390
and avoid https://issues.apache.org/bugzilla/show_bug.cgi?id=48616
Fix compilation error with some nested tag files and simple tags.
Do not declare or synchronize scripting variables for JSP fragments
since they are scriptless.
Modified:
tomcat/tc5.5.x/trunk/STATUS.txt
tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml
tomcat/tc5.5.x/trunk/jasper/src/share/org/apache/jasper/compiler/Generator.java
Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL:
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=935941&r1=935940&r2=935941&view=diff
==============================================================================
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Tue Apr 20 14:35:33 2010
@@ -42,13 +42,6 @@ PATCHES PROPOSED TO BACKPORT:
+1: kkolinko, rjung
-1:
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42390
- Fix compilation error with some nested tag files and simple tags
- https://issues.apache.org/bugzilla/show_bug.cgi?id=48616#c22
- (https://issues.apache.org/bugzilla/attachment.cgi?id=24993)
- +1: kkolinko, markt, jfclere
- -1:
-
* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44041
Threading issue in class loading plus fix for
https://issues.apache.org/bugzilla/show_bug.cgi?id=48694 a potential deadlock
Modified: tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml?rev=935941&r1=935940&r2=935941&view=diff
==============================================================================
--- tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml (original)
+++ tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml Tue Apr 20
14:35:33 2010
@@ -80,6 +80,12 @@
<subsection name="Jasper">
<changelog>
<fix>
+ <bug>42390</bug>, <bug>48616</bug>: Fix compilation error with some
+ nested tag files and simple tags. Do not declare or synchronize
+ scripting variables for JSP fragments since they are scriptless.
+ (kkolinko)
+ </fix>
+ <fix>
<bug>48701</bug>: Add a system property to allow disabling enforcement
of JSP.5.3. The specification recommends, but does not require, this
enforcement. (kkolinko)
Modified:
tomcat/tc5.5.x/trunk/jasper/src/share/org/apache/jasper/compiler/Generator.java
URL:
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/jasper/src/share/org/apache/jasper/compiler/Generator.java?rev=935941&r1=935940&r2=935941&view=diff
==============================================================================
---
tomcat/tc5.5.x/trunk/jasper/src/share/org/apache/jasper/compiler/Generator.java
(original)
+++
tomcat/tc5.5.x/trunk/jasper/src/share/org/apache/jasper/compiler/Generator.java
Tue Apr 20 14:35:33 2010
@@ -311,6 +311,9 @@ class Generator {
}
public void visit(Node.CustomTag n) throws JasperException {
+ // XXX - Actually there is no need to declare those
+ // "_jspx_" + varName + "_" + nestingLevel variables when we
are
+ // inside a JspFragment.
if (n.getCustomNestingLevel() > 0) {
TagVariableInfo[] tagVarInfos = n.getTagVariableInfos();
@@ -2476,6 +2479,11 @@ class Generator {
}
private void declareScriptingVars(Node.CustomTag n, int scope) {
+ if (isFragment) {
+ // No need to declare Java variables, if we inside a
+ // JspFragment, because a fragment is always scriptless.
+ return;
+ }
Vector vec = n.getScriptingVars(scope);
if (vec != null) {
@@ -2525,6 +2533,14 @@ class Generator {
if (n.getCustomNestingLevel() == 0) {
return;
}
+ if (isFragment) {
+ // No need to declare Java variables, if we inside a
+ // JspFragment, because a fragment is always scriptless.
+ // Thus, there is no need to save/ restore/ sync them.
+ // Note, that JspContextWrapper.syncFoo() methods will take
+ // care of saving/ restoring/ sync'ing of JspContext
attributes.
+ return;
+ }
TagVariableInfo[] tagVarInfos = n.getTagVariableInfos();
VariableInfo[] varInfos = n.getVariableInfos();
@@ -2586,6 +2602,14 @@ class Generator {
if (n.getCustomNestingLevel() == 0) {
return;
}
+ if (isFragment) {
+ // No need to declare Java variables, if we inside a
+ // JspFragment, because a fragment is always scriptless.
+ // Thus, there is no need to save/ restore/ sync them.
+ // Note, that JspContextWrapper.syncFoo() methods will take
+ // care of saving/ restoring/ sync'ing of JspContext
attributes.
+ return;
+ }
TagVariableInfo[] tagVarInfos = n.getTagVariableInfos();
VariableInfo[] varInfos = n.getVariableInfos();
@@ -2641,6 +2665,15 @@ class Generator {
* the given scope.
*/
private void syncScriptingVars(Node.CustomTag n, int scope) {
+ if (isFragment) {
+ // No need to declare Java variables, if we inside a
+ // JspFragment, because a fragment is always scriptless.
+ // Thus, there is no need to save/ restore/ sync them.
+ // Note, that JspContextWrapper.syncFoo() methods will take
+ // care of saving/ restoring/ sync'ing of JspContext
attributes.
+ return;
+ }
+
TagVariableInfo[] tagVarInfos = n.getTagVariableInfos();
VariableInfo[] varInfos = n.getVariableInfos();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]