You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%-- 构建分页导航 --%>
共有${requestScope.pageBean.totalRecord}条信息,共${requestScope.pageBean.totalPage }页,当前为${requestScope.pageBean.pageNum}页
<br/>
<c:choose>
<c:when test="${requestScope.pageBean.pageNum != 1 }"><!-- 如果当前页为1, 则不显示首页和上一页 -->
<a href="${pageContext.request.contextPath}/FindAllWithPage?pageNum=1">首页</a>
<a href="${pageContext.request.contextPath}/FindAllWithPage?pageNum=${requestScope.pageBean.pageNum-1 }">上一页</a>
</c:when>
</c:choose>
<!-- 遍历页码 -->
<c:forEach begin="${requestScope.pageBean.start}" end="${requestScope.pageBean.end}" step="1" var="i">
<c:choose>
<c:when test="${requestScope.pageBean.pageNum == i}"><!-- 如果为当前页,则特殊显示 -->
<a style="height:24px; margin:0 3px; border:none;">${i}</a>
</c:when>
<c:otherwise><!-- 否则,普通显示 -->
<a href="?pageNum=${i}">${i}</a>
</c:otherwise>
</c:choose>
</c:forEach>
<c:choose>
<c:when test="${requestScope.pageBean.pageNum != requestScope.pageBean.totalPage }"><!-- 如果当前页为总的记录数,则不显示末页和下一页 -->
<a href="${pageContext.request.contextPath}/FindAllWithPage?pageNum=${requestScope.pageBean.pageNum+1 }">下一页</a>
<a href="${pageContext.request.contextPath}/FindAllWithPage?pageNum=${requestScope.pageBean.totalPage }">末页</a>
</c:when>
</c:choose>
<%--尾页 --%>
<a href="${pageContext.request.contextPath}/FindAllWithPage?pageNum=${requestScope.pageBean.totalPage}">尾页</a>
</body>
</html>