Author: markt
Date: Sat Aug 29 13:24:18 2009
New Revision: 809131
URL: http://svn.apache.org/viewvc?rev=809131&view=rev
Log:
Fix regression in previous fix for
https://issues.apache.org/bugzilla/show_bug.cgi?id=38797
Update list of introduced variables before the tag body is processed in case
they are used in the tag body.
Modified:
tomcat/trunk/java/org/apache/jasper/compiler/Generator.java
Modified: tomcat/trunk/java/org/apache/jasper/compiler/Generator.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Generator.java?rev=809131&r1=809130&r2=809131&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/Generator.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Generator.java Sat Aug 29
13:24:18 2009
@@ -1747,6 +1747,17 @@
generateLocalVariables(out, n);
}
+ // Add the named objects to the list of 'introduced' names to
enable
+ // a later test as per JSP.5.3
+ VariableInfo[] infos = n.getVariableInfos();
+ if (infos != null && infos.length > 0) {
+ for (int i = 0; i < infos.length; i++) {
+ VariableInfo info = infos[i];
+ if (info != null && info.getVarName() != null)
+ pageInfo.getVarInfoNames().add(info.getVarName());
+ }
+ }
+
if (n.implementsSimpleTag()) {
generateCustomDoTag(n, handlerInfo, tagHandlerVar);
} else {
@@ -1798,17 +1809,6 @@
out = outSave;
}
- // Add the named objects to the list of 'introduced' names to
enable
- // a later test as per JSP.5.3
- VariableInfo[] infos = n.getVariableInfos();
- if (infos != null && infos.length > 0) {
- for (int i = 0; i < infos.length; i++) {
- VariableInfo info = infos[i];
- if (info != null && info.getVarName() != null)
- pageInfo.getVarInfoNames().add(info.getVarName());
- }
- }
-
}
private static final String DOUBLE_QUOTE = "\\\"";
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]