从数据库中读取众多数据,将其进行分页展示。
<h2>
<!--<a href=\'#\'" /a> -->
<c:choose>
<c:when test="${page gt 1}">
<a href=\'#\'" /a>
</c:when>
<c:otherwise>
上一页
</c:otherwise>
</c:choose>
|第 ${page} 页|
<!-- <a href=\'#\'" /a> -->
<c:choose>
<c:when test="${page lt totalPages}">
<a href=\'#\'" /a>
</c:when>
<c:otherwise>
下一页
</c:otherwise>
</c:choose>
</h2>
<
c:when
test
=
"${page gt 1}"
> 当在第一页的时候,不能再向前跳转。
<
c:when
test
=
"${page lt totalPages}"
> 当在最后一页后,不能再向后跳转。