I was looking at how to implement a thing in struts2 jstl, but I cannot find a way.
When I load a jsp page from an action, I have a list of string lists.
I want to create as divs, since the elements have a list, but inside each div I want to create a link as the third element of this sub-list.
Therefore, I use the s: iterator tag to parse the list. But I don’t know how to repeat "$ {item [2]}" times inside the first iterator.
The code would be something like this:
<s:iterator value="functions" var="item" status="stat">
<span class="operation">${item[1]}</span>
<div id="${item[0]}">
<s:for var $i=0;$i<${item[2]};$i++>
<a href="#" id="link_$i">Link $i</a>
</s:for>
</div>
</s:iterator>
Where I put the s: for tag, where I would like to repeat "$ {item [2]}" times ...
Can anybody help me?
Thank you very much in advance, Aleix
source
share