employees.jsp
来自「Java 官方的CRUD教程」· JSP 代码 · 共 43 行
JSP
43 行
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<link href="<s:url value='/css/main.css'/>" rel="stylesheet" type="text/css"/>
<title><s:text name="label.employees"/></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"/>">Add New Employee</a>
<br/><br/>
<table class="borderAll">
<tr>
<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> </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="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"/>">Edit</a>
<s:url action="crud!delete" id="url">
<s:param name="employee.employeeId" value="employeeId"/>
</s:url>
<a href="<s:property value="#url"/>">Delete</a>
</td>
</tr>
</s:iterator>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?