showlist.jsp

来自「基于struts2+hibernate的简单分页」· JSP 代码 · 共 69 行

JSP
69
字号
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%@ taglib  prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>   
    <title>My JSP 'showList.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body> 
  <table>
  <tr>    <table align="center" width="80%">
    	<tr><td>ENAME</td><td>EMPNO</td><td>EMPDATE</td><td>EDEPT</td></tr>
    	<s:iterator status="st" value="empList">
    	<s:if test=" #st.index < page.pageEnd && #st.index>=page.pageBegin">
    		<tr>
    			<td><s:property value="empList[#st.index].empName"/></td>
    			<td><s:property value="empList[#st.index].empNo"/></td>
    			<td><s:property value="empList[#st.index].empDate"/></td>
    			<td><s:property value="empList[#st.index].dept.deptName"/></td>
    			
    		</tr>
    	</s:if>	
    	</s:iterator>
    	
    </table>
    </tr>
    <table align="center" style="bottom: 100xp" width="50%">
    <tr align="right">
    		<td align="left">		
    		
    		<a href="empPage.action?page.pageMethod=first">FirstPage</a>
    		
    		</td>
    		<td align="left">	
    		
    		<a href="empPage.action?page.pageBegin=<s:property value='page.pageBegin'/> && page.pageEnd=<s:property value='page.pageEnd'/> && page.pageMethod=prev">PREV</a>
    		
    		</td>
    		
    		<td align="left">
    		
    		<a href="empPage.action?page.pageBegin=<s:property value='page.pageBegin'/> && page.pageEnd=<s:property value='page.pageEnd'/> && page.pageMethod=next">NEXT</a>
    		
    		</td>
    		
    		<td align="left">
    		<s:property value='page.pageBegin'/> ..<s:property value='page.pageEnd'/>
    		当前是第 <s:property value="page.currenPage"/>页        共<s:property value="page.pageTotal"/>页
    		<s:if test="page.pageEnd!=(page.listSize-1)">	
    		<a href="empPage.action?page.pageMethod=last">LAST</a>
    		</s:if>	
    		</td>
    </tr>
    </table>
    </table>
  </body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?