Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help required for forEach tag

 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a ArrayList named vec. Data in ArrayList is shown below
vec[data1,data2,data3,data4,data5,data6,data7,data8,data9]
I am using c:forEach tag
I have to display ArrayList vec in table formate

I am using code below
<table >
<tr>
<c:forEach var="v" items="${vec}" >
<td>${v}</td>
</c:forEach>
</tr>
</table>
Above code display whole list in single row.

But my requirement is that Each row should contain 3 cells only
My table should be in format shown below

data1 data2 data3
data4 data5 data6
data7 data8 data9

Thanks
 
Marimuthu Madasamy
Ranch Hand
Posts: 72
Java Monad Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this..

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic