Does anyone know how to test for the first member and last member in a gsp loop?
Here's my jsp code:
<c:forEach items='${aSet}' var='elem' varStatus="loop">
<c:if test='${loop.first}'>
<p>Display something</p>
</c:if>
</c:forEach>
I know you can test for status in a g:each statement but that's just an integer. Is there anything to access the first and last element? If not, is there another way to do what I'm doing?
Any help appreciated.