Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to iterate Array List

 
Pramod Kumar
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a arraylist and I need to iterate and display the values with <bean:write

here is the code

<bean:write name="allnames" />

I am adding allnames.add("name1");......etc

it is displaying in browser as [name1, name2] in a single row I need to be displayed seperately.

<bean:write name="allnames" property="?"/>


what is the property name here I need to give?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 35762
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pramod,
Wy not use logic:iterate? You can still use bean:write on each iteration through the loop.
 
money grubbing section goes here:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!