⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 listperson.jsp

📁 ssh分页的一个例子内含数据库文件 在src文件夹下自己找
💻 JSP
字号:
<%@ page contentType="text/html; charset=GBK"%>
<!-- 以分页方式显示人物信息 -->
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/WEB-INF/tlds/page.tld" prefix="page"%>

<html>
	<head>
		<title>分页示例</title>
		<base href="http://localhost:8080/PageDemo/" />
		<link rel="stylesheet" type="text/css" href="css/style.css" />
	</head>

	<body>
		<html:form action="person" onsubmit="return check();">
			<input type="hidden" name="method" value="toList" />
			<table border="1" class="dataList">
				<tr>
					<th width="10%">
						编号
					</th>
					<th width="20%">
						姓名
					</th>
					<th width="10%">
						年龄
					</th>
					<th width="40%">
						住址
					</th>
					<th width="20%">
						部门
					</th>
				</tr>
				<!-- 循环显示集合数据 -->
				<c:forEach items="${personForm.pageResult.list}" var="p">
					<tr onmouseover="this.bgColor='#c0c0c0';" onmouseout="this.bgColor='#ffffff';">
						<td>
							${p.id}
						</td>
						<td>
							${p.name}
						</td>
						<td>
							${p.age}
						</td>
						<td>
							${p.address}
						</td>
						<td>
							${p.department.deptName}
						</td>
					</tr>
				</c:forEach>
			</table>
			<page:link formName="personForm"/>
		</html:form>
	</body>
</html>

⌨️ 快捷键说明

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