Author: markt Date: Mon Apr 29 13:27:34 2013 New Revision: 1477052 URL: http://svn.apache.org/r1477052 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54888 Support a csv list with the ForEach tag plugin Patch provided by Sheldon Shao.
Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/ForEach.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ ------------------------------------------------------------------------------ Merged /tomcat/trunk:r1477051 Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/ForEach.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/ForEach.java?rev=1477052&r1=1477051&r2=1477052&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/ForEach.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/ForEach.java Mon Apr 29 13:27:34 2013 @@ -155,6 +155,10 @@ public final class ForEach implements Ta ctxt.generateJavaSource("else if (" + itemsV + " instanceof Map)"); ctxt.generateJavaSource(iterV + "=((Map)" + itemsV + ").entrySet().iterator();"); + // String + ctxt.generateJavaSource("else if (" + itemsV + " instanceof String)"); + ctxt.generateJavaSource(iterV + "=toIterator(new StringTokenizer((String)" + itemsV + ", \",\"));"); + // Not null ctxt.generateJavaSource("if (" + iterV + " != null) {"); Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1477052&r1=1477051&r2=1477052&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Apr 29 13:27:34 2013 @@ -110,6 +110,10 @@ expressions in a JSP document if EL expressions have been disabled. (kkolinko/markt) </fix> + <fix> + <bug>54888</bug>: Add support for CSV lists with the ForEach tag plugin. + Patch provided by Sheldon Shao. (markt) + </fix> </changelog> </subsection> <subsection name="Cluster"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org