File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Iterate over an arraylist of beans ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Iterate over an arraylist of beans ?" Watch "Iterate over an arraylist of beans ?" New topic

Iterate over an arraylist of beans ?

lakshmanan anand

Joined: Jan 13, 2009
Posts: 22

My JSP receives an array list of beans from an action.

I want to print the individual properties of beans in my JSP one per line. How can i do it ?

My arraylist is a list of persons.
IN my jsp i want to print the person name and its other properties one per line.

please help
Ankit Garg

Joined: Aug 03, 2008
Posts: 9462

Did you try anything yet?? Look at the s:iterator tag (if you are using Struts 2.x) and try to figure out how to achieve what you want...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
David Newton

Joined: Sep 29, 2008
Posts: 12617

Or JSTL's <c:forEach> tag.
I agree. Here's the link:
subject: Iterate over an arraylist of beans ?
It's not a secret anymore!