https://issues.apache.org/bugzilla/show_bug.cgi?id=54012
Priority: P2 Bug ID: 54012 Assignee: dev@tomcat.apache.org Summary: No "pageContext" in tag files' generated java code when using code generation by JSTL tagplugin "Set" Severity: normal Classification: Unclassified Reporter: xs...@ebay.com Hardware: PC Status: NEW Version: trunk Component: Jasper Product: Tomcat 7 Created attachment 29485 --> https://issues.apache.org/bugzilla/attachment.cgi?id=29485&action=edit Patch for org.apache.jasper.tagplugins.jstl.core.Set.java The code generated by the following code from " org.apache.jasper.tagplugins.jstl.core.Set" can't work in Tag Files. There is no "PageContext" in tag file. So this should check "isTagFile". String strVar = ctxt.getConstantAttribute("var"); ctxt.generateJavaSource("if(null != " + resultName + "){"); ctxt.generateJavaSource(" pageContext.setAttribute(\"" + strVar + "\"," + resultName + "," + iScope + ");"); ctxt.generateJavaSource("} else {"); if(hasScope){ ctxt.generateJavaSource(" pageContext.removeAttribute(\"" + strVar + "\"," + iScope + ");"); }else{ ctxt.generateJavaSource(" pageContext.removeAttribute(\"" + strVar + "\");"); } ctxt.generateJavaSource("}"); -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org