EL表达式分页

来源:互联网 发布:java 读取本地zip文件 编辑:程序博客网 时间:2024/06/06 06:50
<body class="page" style="min-width:1000px;">
    
    <div id="lrgHeader">管理留言</div>
    <div id="lrgHeader1">
   
    <table>
    <tr>
    <th>昵称:</th>
    <th>标题:</th>
    <th>日期</th>
    <th>状态</th>
    <th>操作</th>
   
   
    </tr>
   
    <c:choose>
     <c:when test="${empty psEn}">
<tr><td colspan="5">暂时没有用户</td></tr>
     </c:when>
     <c:otherwise>
      <c:forEach items="${psEn}" var="u">
      <tr>
      <td>${u.name}</td>
      <td>${u.title }</td>
      <td style="font-size:16px;">${u.createTime}</td>
      <td>${u.isHidden }</td>
      <td>回复/删除</td>
     
     
     
     
      </tr>
      </c:forEach>
     
     </c:otherwise>
     
     
     
     </c:choose>




    <tr>
    <th colspan="5">
    第${pageIndex }页/共${totalPage }页
    <a  href="PublishqueryServlet?pageIndex=${1 }">首页</a>
    <c:choose>
    <c:when test="${currentPage>1} ">
    <a  href="PublishqueryServlet?pageIndex=${currentPage-1 }">上一页</a>
    </c:when>
    <c:otherwise>
    上一页
    </c:otherwise>
   
    </c:choose>
    <c:forEach var="p" begin="1" end="${totalPage }">
                            <a href="PublishqueryServlet?pageIndex=${p}">第${p}页</a>
         </c:forEach>
   
   
    <c:choose>
    <c:when test="${currentPage<totalPage}">
    <a  href="PublishqueryServlet?pageIndex=${currentPage+1 }">下一页</a>
   
    </c:when>
    <c:otherwise>
    下一页
    </c:otherwise>
    </c:choose>
   
    <a  href="PublishqueryServlet?pageIndex=${totalPage}">尾页</a>
    </th>
   
   
   
    </tr>
    </table>
    </div>
0 0
原创粉丝点击