Struts2 控制标签
下面介绍struts2的页面控制标签。
(1) <s:url>
<!--定义一个超级链接,可以带参数。-->
<s:url id="url" action="listBooks"> <s:param name="curPage"> <s:property value="%{pager.curPage+1}"/> </s:param> </s:url>
<s:a href="%{url}">next</s:a>
(2)<s:if><s:if test="%{pager.curPage==1}"> 首页 </s:if> <s:if test="%{pager.curPage>1}"> <span onclick="jump(<s:property value="%{pager.curPage-1}"/>,'<s:property value="pager.url"/>')" style="cursor:hand">上一页 </s:if>