Using a nested custom tag that creates a scripting variable leads Jasper to create invalid code. I don't believe that this is the same fault as bug # 12432, but is possibly related. A sample tag handler class is: public class TestTag extends TagSupport { static int num = 1; String val = null; public void setVal(String val) { this.val = val; } public int doStartTag() throws JspException { /* Store the scripting variable */ pageContext.setAttribute(val, new Integer(num++)); return EVAL_BODY_INCLUDE; } public void release() { val = null; } } A sample JSP is: <%@ taglib prefix="lib" uri="/testlib" %> <HTML> <BODY> <lib:testtag val="one"> <lib:testtag val="two"/> <p>Val after the inner tag is <%=two%></p> </lib:testtag> <p>Val after the outer tag is <%=one%></p> </BODY> </HTML> The sample output is: Val after the inner tag is null Val after the outer tag is 1 I think that the 'Val after the inner tag' should be 2 (at least, that's the way it worked in Tomcat v3.x and also in other containers such as JRun).
Fixed in CVS