Look here for a description of the statusVar variable. You can do something like below, where the "status" variable contains the current iteration status. This is very useful if you need special annotations for the first and last iterators. In the following case, I want to skip the comma after the last tag. Of course, you can replace status.last with status.first to do something special in the first iteration:
<td> <c:forEach var="tag" items="${idea.tags}" varStatus="status"> <span>${tag.name not status.last ? ', ' : ''}</span> </c:forEach> </td>
The options are: current, index, count, first, last, begin, step, and end
lanoxx Dec 11 '11 at 15:45 2011-12-11 15:45
source share