Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Iterate over an arraylist of beans ?

 
lakshmanan anand
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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
Sheriff
Posts: 9528
32
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or JSTL's <c:forEach> tag.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic