Struts2 increment a previous set <s:set /> value
You aren't required to create a reference variable just use #i.index
or #i.count
inside the iterator. It's already incremented by the iterator tag itself.
Note that "count" is 1-based, "index" is 0-based.
Always check the docs.
If you still need your own counter
<s:set var="counter" value="0"/>
increment
<s:set var="counter" value="%{#counter+1}"/>