• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSTL arraylist of strings

 
Janhvi Malhotra
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have
<table>
<c:forEach var="test" items="testList" >
<tr><td><cut value = "${test}" /></td></tr>
</c:forEach>
</table>


where testList is an arraylist of strings in requestScope

this is printing testList

What am i doing wrong? using jstl 1.1 on tomcat 5

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65126
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You've made a common error. The forEach code should be:

 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wish there were an indicator on this forum to tell when the bear is toddling around. That would save me some time trying to think, although the bear has already answered the question
 
Janhvi Malhotra
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Silly me!!! thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65126
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Satou kurinosuke:
when the bear is toddling around


Bear's don't toddle. We amble!


[ January 12, 2006: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic