<s:set var = "pagenum" value = "#articles.length%5==0 ? #articles.length/5 : #articles.length/5+1" />
<s:property value = "#pagenum" />
</li>
<s:iterator value = "#pagenum" id = "currentpage" status = "xyz">
<li class="active_page">
<a href="javascript:void(0);">1</a>
</li>
<li>
<a href="javascript:void(0);">2</a>
</li>
<li>
<a href="javascript:void(0);">3</a>
</li>
<li>
<a href="javascript:void(0);">4</a>
</li>
<li>
<a href="javascript:void(0);">5</a>
</li>
</s:iterator>
#pagenum这个值是2 但是iterator标签内的内容 那一些个链接只打印了一次
不是应该打印两次的吗?
------解决方案--------------------
<s:iterator value
这里的value是一个数组,你传一个2过来啥意思?
<s:iterator var="counter" begin="1" end="5" >
<!-- current iteration value (1, ... 5) -->
<s:property value="top" />
</s:iterator>