-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.jsp
More file actions
44 lines (44 loc) · 1.31 KB
/
index.jsp
File metadata and controls
44 lines (44 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import ="java.util.*" %>
<%@ page import ="com.sample.*" %>
<%@ page import ="static com.sample.Globals.*" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>List Contacts</title>
<link rel="stylesheet" type="text/css" href=",.css" />
</head>
<body>
<header>
JavaContactsExample
</header>
<div class="the-width">
<h1>
A list of the Contacts • <a href="edit.jsp?id=0">Add Contact</a>
</h1>
<table class="fancy">
<thead>
<tr>
<th>ID</th>
<th>First Name</th>
<th>Last Name</th>
<th>Email Address</th>
<th></th>
</tr>
</thead>
<tbody><%
for (OurData.Contact r : OurData.THE_MAP.values()) {%>
<tr<%if (String.valueOf(r.id).equals(request.getParameter("highlight"))) {%> class="highlight"<%}%>>
<td><%=r.id%></td>
<td><%=htmlE(r.nameFirst)%></td>
<td><%=htmlE(r.nameLast)%></td>
<td><%=htmlE(r.email)%></td>
<td><a href="edit.jsp?id=<%=r.id%>">View/Edit</a></td>
</tr><%
}%>
</tbody>
</table>
</div>
</body>
</html>