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 Mon, 26 Aug 2002 23:47:47 GMT
luehe       2002/08/26 16:47:47

  Modified:    jasper2/src/share/org/apache/jasper/compiler 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
  1.80      +27 -29    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.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- Generator.java	24 Aug 2002 21:42:34 -0000	1.79
  +++ Generator.java	26 Aug 2002 23:47:47 -0000	1.80
  @@ -1999,7 +1999,7 @@
   	    out.print(tagHandlerVar);
   	    out.println(".doStartTag();");
   
  -	    if (!n.implementsBodyTag()) {
  +	    if (!n.implementsIterationTag()) {
   		// Synchronize AT_BEGIN scripting variables
   		syncScriptingVars(n, VariableInfo.AT_BEGIN);
   		// Declare and synchronize NESTED scripting variables
  @@ -2013,30 +2013,30 @@
   		out.println(" != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {");
   		out.pushIndent();
   		
  -		if (n.implementsBodyTag()) {
  +		if (n.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("out = pageContext.pushBody();");
  -		    out.printin(tagHandlerVar);
  -		    out.println(".setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);");
  -		    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 (n.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("out = pageContext.pushBody();");
  +			out.printin(tagHandlerVar);
  +			out.println(".setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);");
  +			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();
   		}
  @@ -2056,10 +2056,8 @@
   		out.println(".doAfterBody();");
   
   		// Synchronize AT_BEGIN and NESTED scripting variables
  -		if (n.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