Pager Tag Library JSP分页标签库 项目简介
Pager Tag Library 是一个非常易用而且灵活的在 JSP 页面中显示分页链接的标签库。示例代码:<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
<pg:pager>
<pg:param name="keywords"/>
<ex:searchresults>
<pg:item>
<%= searchResult %>
</pg:item>
</ex:searchresults>
<pg:index>
<pg:first>
<a href="<%= pageUrl %>">[ (<%= pageNumber %>) |< Previous ]</a>
</pg:first>
<pg:prev>
<a href="<%= pageUrl %>">[ (<%= pageNumber %>) << Previous ]</a>
</pg:prev>
<pg:pages>
<a href="<%= pageUrl %>"><%= pageNumber %></a>
</pg:pages>
<pg:next>
<a href="<%= pageUrl %>">[ Next >> (<%= pageNumber %>) ]</a>
</pg:next>
<pg:last>
<a href="<%= pageUrl %>">[ Last >| (<%= pageNumber %>) ]</a>
</pg:last>
</pg:index>
</pg:pager>
<pg:pager>
<pg:param name="keywords"/>
<ex:searchresults>
<pg:item>
<%= searchResult %>
</pg:item>
</ex:searchresults>
<pg:index>
<pg:first>
<a href="<%= pageUrl %>">[ (<%= pageNumber %>) |< Previous ]</a>
</pg:first>
<pg:prev>
<a href="<%= pageUrl %>">[ (<%= pageNumber %>) << Previous ]</a>
</pg:prev>
<pg:pages>
<a href="<%= pageUrl %>"><%= pageNumber %></a>
</pg:pages>
<pg:next>
<a href="<%= pageUrl %>">[ Next >> (<%= pageNumber %>) ]</a>
</pg:next>
<pg:last>
<a href="<%= pageUrl %>">[ Last >| (<%= pageNumber %>) ]</a>
</pg:last>
</pg:index>
</pg:pager>