This should sort you out.
<c:forEach var="vissue" items="${list}" varStatus="count">
<c:out value="${count.index}" />
</c:forEach>
On 27 May 2004, at 22:54, Kathy Zhou wrote:
How could I show 3 elements of a ArrayList per line on the page with
<c:forEach> tag.
My code is:
HashMap ilist =......;
Its value is a ArrayList of javabeans having getter/setter methods.
<c:forEach var="vissue" items="${ilist}">
c:out value="${vissue.key}"/><br>
<c:forEach var="var" items="${vissue.value.pcode}">
<c:out value="${var}"/><br> <%--- need 3 var values per line --%>
</c:forEach>
</c:forEach>
it shows me one pcode value per line on html page. But I want to show
three
pcodes per line. Since there is no index number I could use (I may be
wrong) on the second <c:forEach> tag, how could I make it? Any
suggestions?
Thank you.
Kathy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]