Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Design for the Mind this week in the Design 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
Marshal
Posts: 34178
340
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic