This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JSP and the fly likes JSTL arraylist of strings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSTL arraylist of strings" Watch "JSTL arraylist of strings" New topic
Author

JSTL arraylist of strings

Janhvi Malhotra
Greenhorn

Joined: Jan 12, 2006
Posts: 6
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

Joined: Jan 10, 2002
Posts: 61451
    
  67

You've made a common error. The forEach code should be:



[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

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


[My Blog]
All roads lead to JavaRanch
Janhvi Malhotra
Greenhorn

Joined: Jan 12, 2006
Posts: 6
Silly me!!! thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61451
    
  67

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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSTL arraylist of strings