tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Generator.java
Date Tue, 27 Aug 2002 16:46:38 GMT
luehe       2002/08/27 09:46:38

  Modified:    jasper2/src/share/org/apache/jasper/compiler Tag:
                        tomcat_4_branch Generator.java
  Log:
  Fixed 11942: reassignment of variables to pagecontext attributes in body loop
  Fixed 11552: Iteration tags do not resynchronize scripting variables after
               doAfterBody()
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.35.2.4  +30 -32    jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java
  
  Index: Generator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v
  retrieving revision 1.35.2.3
  retrieving revision 1.35.2.4
  diff -u -r1.35.2.3 -r1.35.2.4
  --- Generator.java	17 Aug 2002 00:14:23 -0000	1.35.2.3
  +++ Generator.java	27 Aug 2002 16:46:37 -0000	1.35.2.4
  @@ -1344,7 +1344,7 @@
   	    out.print(tagHandlerVar);
   	    out.println(".doStartTag();");
   
  -	    if (!implementsBodyTag) {
  +	    if (!implementsIterationTag) {
   		// Synchronize AT_BEGIN scripting variables
   		syncScriptingVars(n, VariableInfo.AT_BEGIN);
   		// Declare and synchronize NESTED scripting variables
  @@ -1358,33 +1358,33 @@
   		out.println(" != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {");
   		out.pushIndent();
   		
  -		if (implementsBodyTag) {
  +		if (implementsIterationTag) {
   		    // Declare NESTED scripting variables
   		    declareScriptingVars(n, VariableInfo.NESTED);
   
  -		    out.printin("if (");
  -		    out.print(tagEvalVar);
  -		    out.println(" != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {");
  -		    // Assume EVAL_BODY_BUFFERED
  -		    out.pushIndent();
  -                    out.printil("javax.servlet.jsp.tagext.BodyContent _bc = pageContext.pushBody();");
  -                    out.printil("_bc.clear();");
  -                    out.printil("out = _bc;");
  -
  -		    out.printin(tagHandlerVar);
  -		    out.println(".setBodyContent(_bc);");
  -		    out.printin(tagHandlerVar);
  -		    out.println(".doInitBody();");
  -
  -		    // Synchronize AT_BEGIN and NESTED scripting variables
  -		    syncScriptingVars(n, VariableInfo.AT_BEGIN);
  -		    syncScriptingVars(n, VariableInfo.NESTED);
  -		    
  -		    out.popIndent();
  -		    out.printil("}");
  -		}
  -		
  -		if (implementsIterationTag) {
  +		    if (n.implementsBodyTag()) {
  +			out.printin("if (");
  +			out.print(tagEvalVar);
  +			out.println(" != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {");
  +			// Assume EVAL_BODY_BUFFERED
  +			out.pushIndent();
  +			out.printil("javax.servlet.jsp.tagext.BodyContent _bc = pageContext.pushBody();");
  +			out.printil("_bc.clear();");
  +			out.printil("out = _bc;");
  +
  +			out.printin(tagHandlerVar);
  +			out.println(".setBodyContent(_bc);");
  +			out.printin(tagHandlerVar);
  +			out.println(".doInitBody();");
  +
  +			// Synchronize AT_BEGIN and NESTED scripting variables
  +			syncScriptingVars(n, VariableInfo.AT_BEGIN);
  +			syncScriptingVars(n, VariableInfo.NESTED);
  +			
  +			out.popIndent();
  +			out.printil("}");
  +		    }
  +
   		    out.printil("do {");
   		    out.pushIndent();
   		}
  @@ -1407,10 +1407,8 @@
   		out.println(".doAfterBody();");
   
   		// Synchronize AT_BEGIN and NESTED scripting variables
  -		if (implementsBodyTag) {
  -		    syncScriptingVars(n, VariableInfo.AT_BEGIN);
  -		    syncScriptingVars(n, VariableInfo.NESTED);
  -		}
  +		syncScriptingVars(n, VariableInfo.AT_BEGIN);
  +		syncScriptingVars(n, VariableInfo.NESTED);
   
   		out.printil("if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)");
   		out.pushIndent();
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message