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

📄 employees.jsp

📁 用struts2编写的增删改查例子
💻 JSP
字号:
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="<s:url value='/css/main.css'/>" rel="stylesheet"
	type="text/css" />
<title><s:text name="application.title" /></title>
</head>
<body>
<div class="titleDiv"><s:text name="application.title" /></div>
<h1><s:text name="label.employees" /></h1>
<s:url id="url" action="crud!input" />
<a href="<s:property value="#url"/>"><s:text name="link.add" /></a>
<br />
<br />
<table class="borderAll">
	<tr>
	    <th><s:text name="label.employeeId" /></th>
		<th><s:text name="label.firstName" /></th>
		<th><s:text name="label.lastName" /></th>
		<th><s:text name="label.age" /></th>
		<th><s:text name="label.department" /></th>
		<th>&nbsp;</th>
	</tr>
	<s:iterator value="employees" status="status">
		<tr class="<s:if test="#status.even">even</s:if><s:else>odd</s:else>">
		    <td class="nowrap"><s:property value="employeeId" /></td>
			<td class="nowrap"><s:property value="firstName" /></td>
			<td class="nowrap"><s:property value="lastName" /></td>
			<td class="nowrap"><s:property value="age" /></td>
			<td class="nowrap"><s:property value="department.name" /></td>
			<td class="nowrap">
			    <s:url action="crud!input" id="url">
					<s:param name="employee.employeeId" value="employeeId" />
				</s:url> 
				<a href="<s:property value="#url"/>">修改</a> 
				&nbsp;&nbsp;&nbsp; 
				<s:url action="crud!delete" id="url">
					<s:param name="employee.employeeId" value="employeeId" />
				</s:url> 
				<a href="<s:property value="#url"/>">删除</a>
			</td>
		</tr>
	</s:iterator>
</table>
</body>
</html>

⌨️ 快捷键说明

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