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, 10 Sep 2002 00:36:02 GMT
luehe       2002/09/09 17:36:02

  Modified:    jasper2/src/share/org/apache/jasper/compiler Generator.java
  Log:
  Fixed 12432: Can't compile JSP with nested custom tags that have VariableInfo (cont.)
  
  Revision  Changes    Path
  1.96      +32 -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.95
  retrieving revision 1.96
  diff -u -r1.95 -r1.96
  --- Generator.java	9 Sep 2002 23:24:14 -0000	1.95
  +++ Generator.java	10 Sep 2002 00:36:01 -0000	1.96
  @@ -2004,7 +2004,7 @@
   	    out.print(tagHandlerVar);
   	    out.println(".doStartTag();");
   
  -	    if (!n.implementsIterationTag()) {
  +	    if (!n.implementsBodyTag()) {
   		// Synchronize AT_BEGIN scripting variables
   		syncScriptingVars(n, VariableInfo.AT_BEGIN);
   	    }
  @@ -2015,35 +2015,34 @@
   		out.println(" != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {");
   		out.pushIndent();
   		
  -		if (n.implementsIterationTag()) {
  -		    // Declare NESTED scripting variables
  -		    declareScriptingVars(n, VariableInfo.NESTED);
  -		    saveScriptingVars(n, VariableInfo.NESTED);
  -
  -		    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("}");
  -		    } else {
  -			// Synchronize AT_BEGIN and NESTED scripting variables
  -			syncScriptingVars(n, VariableInfo.AT_BEGIN);
  -			syncScriptingVars(n, VariableInfo.NESTED);
  -		    }
  +		// Declare NESTED scripting variables
  +		declareScriptingVars(n, VariableInfo.NESTED);
  +		saveScriptingVars(n, VariableInfo.NESTED);
  +
  +		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("}");
  +		} else {
  +		    // Synchronize NESTED scripting variables
  +		    syncScriptingVars(n, VariableInfo.NESTED);
  +		}
  +
  +		if (n.implementsIterationTag()) {
   		    out.printil("do {");
   		    out.pushIndent();
   		}
  @@ -2074,8 +2073,9 @@
   
   		    out.popIndent();
   		    out.printil("} while (true);");
  -		    restoreScriptingVars(n, VariableInfo.NESTED);
   		}
  +
  +		restoreScriptingVars(n, VariableInfo.NESTED);
   
   		if (n.implementsBodyTag()) {
   		    out.printin("if (");
  
  
  

--
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