• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help required for forEach tag

 
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 72
Scala Monad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try this..

reply
    Bookmark Topic Watch Topic
  • New Topic