?? list.jsp
字號:
<%@ page language="java" contentType="text/html" %>
<%@ page import="com.ora.jsp.util.*" %>
<%@ taglib uri="/orataglib" prefix="ora" %>
<html>
<head>
<title>Search Result</title>
</head>
<body bgcolor="white">
<jsp:useBean id="empList" scope="request" class="java.util.Vector" />
<% if (empList.size() == 0) { %>
Sorry, no employees were found.
<% } else { %>
The following employees were found:
<p>
<table border=1>
<th>Last Name</th>
<th>First Name</th>
<th>Department</th>
<th>Email Address</th>
<th>Modified</th>
<th>User Name</th>
<th>Password</th>
<ora:loop name="empList" loopId="row" className="com.ora.jsp.sql.Row" >
<tr>
<td><%= row.getString("LastName") %></td>
<td><%= row.getString("FirstName") %></td>
<td><%= row.getString("Dept") %></td>
<td><%= row.getString("EmailAddr") %></td>
<td><%= row.getString("ModDate") %></td>
<% if (request.isUserInRole("admin") ||
row.getString("UserName").equals(request.getRemoteUser())) { %>
<td><%= row.getString("UserName") %></td>
<td><%= row.getString("Password") %></td>
<% } else { %>
<td>**</td>
<td>**</td>
<% } %>
<% if (request.isUserInRole("admin")) { %>
<td>
<form action="delete.jsp" method="post">
<input type="hidden" name="userName"
value='<%= StringFormat.toHTMLString(row.getString("UserName")) %>'>
<input type="hidden" name="firstName"
value='<%= StringFormat.toHTMLString(request.getParameter("firstName")) %>'>
<input type="hidden" name="lastName"
value='<%= StringFormat.toHTMLString(request.getParameter("lastName")) %>'>
<input type="hidden" name="dept"
value='<%= StringFormat.toHTMLString(request.getParameter("dept")) %>'>
<input type="submit" value="Delete">
</form>
</td>
<% } %>
</tr>
</ora:loop>
</table>
<% } %>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -