File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes How to iterate Array List Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to iterate Array List" Watch "How to iterate Array List" New topic

How to iterate Array List

Pramod Kumar
Ranch Hand

Joined: Oct 05, 2007
Posts: 40
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

Joined: May 26, 2003
Posts: 32818

Wy not use logic:iterate? You can still use bean:write on each iteration through the loop.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Consider Paul's rocket mass heater.
subject: How to iterate Array List
It's not a secret anymore!