EL表达式,分页 ,集合遍历

  1. <%@ page language="java" pageEncoding="utf-8" %>  
  2. <%@ include file="/WEB-INF/views/include/taglib.jsp"%>  
  3. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">  
  4. <HTML>  
  5. <head>  
  6.     <%@ include file="/WEB-INF/views/include/head.jsp" %>  
  7.     <%@ include file="/WEB-INF/views/include/jquery.jsp" %>  
  8.     <%@ include file="/WEB-INF/views/include/bootstrap.jsp" %>  
  9.     <%@ include file="/WEB-INF/views/include/picker.jsp" %>  
  10.     <link href="${ctx}/static/css/common.css" rel="stylesheet" type="text/css"/>  
  11. </head>  
  12. <body>  
  13. <div  align="center" style="margin-top: 50px">  
  14.     <p>我是主页 MyPage1111</p>  
  15. </div>  
  16. <div align="center">  
  17.     <input type="text" name="search" id="search">  
  18. </div>  
  19. <div>  
  20. <table border="1" align="center"  bgcolor="#f0ffff" width="60%">  
  21.     <tr>  
  22.         <td>用户id</td>  
  23.         <td>用户手机号</td>  
  24.         <td>用户密码</td>  
  25.         <td>用户地址</td>  
  26.         <td>用户头像</td>  
  27.         <td>删除</td>  
  28.   
  29.     </tr>  
  30. <c:forEach items="${hospitalList}" var="hosipital">  
  31.     <tr>  
  32.         <td>${hosipital.id}</td>  
  33.         <td>${hosipital.hospitalName}</td>  
  34.         <td>${hosipital.hospitalAddress}</td>  
  35.         <td>${hosipital.isApprove}</td>  
  36.         <td><img src="${hosipital.hospitalIcon}"/></td>  
  37.         <td>   <a href="${ctx}/deleteUserById?userId=${hosipital.id}">修改</a></td>  
  38.     </tr>  
  39. </c:forEach>  
  40. <tr>  
  41.   
  42.     <td>  
  43.         <a href="${ctx}/hospitallist?page=0&size=${requestScope.size}">首页</a>  
  44.     </td>  
  45.     <td>  
  46.         当前页 ${requestScope.page}  
  47.     </td>  
  48.     <td>  
  49.         <c:choose>  
  50.             <c:when test="${requestScope.page<requestScope.totalPage-1}">  
  51.                 <a href="${ctx}/hospitallist?page=${requestScope.page+1}&size=${requestScope.size}">下一页${requestScope.page+1}</a>  
  52.             </c:when>  
  53.   
  54.             <c:otherwise>  
  55.                 下一页  
  56.             </c:otherwise>  
  57.         </c:choose>  
  58.     </td>  
  59.   
  60.     <td>  
  61.         <c:choose>  
  62.             <c:when test="${requestScope.page>0}">  
  63.                 <a href="${ctx}/hospitallist?page=${requestScope.page-1}&size=${requestScope.size}">上一页${requestScope.page-1}</a>  
  64.             </c:when>  
  65.   
  66.             <c:otherwise>  
  67.                 上一页  
  68.             </c:otherwise>  
  69.         </c:choose>  
  70.     </td>  
  71.   
  72.     <td>  
  73.         <a href="${ctx}/hospitallist?page=${requestScope.totalPage-1}&size=${requestScope.size}">尾页${requestScope.totalPage-1}</a>  
  74.     </td>  
  75. </tr>  
  76. </table>  
  77.   
  78. </div>  
  79. </body>  
  80. </html>  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值