Created attachment 29482 [details] Patch for org.apache.jasper.tagplugins.jstl.core.Out.java When setting up org.apache.jasper.tagplugins.jstl.core.Out as a tagplugin and trying to make code generation for the following code, <c:out escapeXml="false" value="test"/> It will generate an error. It has a typo in it if(hasEscapeXml){ ctxt.generateJavaSource(strEscapeXmlName + " = Boolean.parseBoolean(("); ctxt.generateAttribute("default"); ctxt.generateJavaSource(").toString());"); } The attribute name should be "escapeXml". Even change the right name, it occurs an error because of "(false).toString()". Attached two patchs for this bug fix and code simplified.
Created attachment 29483 [details] Patch for org.apache.jasper.tagplugins.jstl.Util.java
Created attachment 29484 [details] Patch for org.apache.jasper.tagplugins.jstl.core.Out.java
Many thanks for the patches. I modified the clean-up slightly and added some test cases for trunk. The fix was applied to trunk and 7.0.x and will be included in 7.0.33 onwards.
See bug 54144 for review of r1401816 and other missing features of tagplugin implementation of the <c:out> tag. Essentially, this patch has to be reverted, as it broke a feature of the <c:out> tag that the tag body is used as the default if none is specified. Those were the following lines: - ctxt.generateJavaSource(" }else{"); - ctxt.generateBody(); - ctxt.generateJavaSource(" }");
I've fixed using body as the default issue in trunk and 7.0.x.