Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how can i iterate arrayList in jsp

 
mk yadav
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i iterate arraylist in jsp

<c:forEach var="lists" items="${list}">
<tr>

but i dont want to write this hard code

<td><c:out value="${lists.get(0)}" /><td>
<td><c:out value="${lists.(1)}" /><td>

because i have more elements ...actually i want to use some checks when it will be iterate.
</tr>
</c:forEach>
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mk yadav wrote:
actually i want to use some checks when it will be iterate.

all this check, business validation should be done before jsp i.e, in servlet for instance.

by the way: to do some check , you want to access element by index, I wonder how it will help you?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic