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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 9291

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.
Don't get me started about those stupid light bulbs.
subject: Iterate over an arraylist of beans ?
Similar Threads
Retrieving List from DB and setting to JSP in struts 2
Proper EL Syntax
How to get data from pageContext
Empty bean
Help In displaying properties of objects contained in ArrayList