-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShowCategories.jspx
68 lines (54 loc) · 1.53 KB
/
ShowCategories.jspx
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:my="http://jakarta.apache.org/tomcat/mytaglib"
xmlns:fn="http://java.sun.com/jsp/jstl/functions" >
<head>
<title>Catalog</title>
<meta http-equiv="Content-Script-Type" content="text/javascript" />
</head>
<body>
<c:set var="category" value="${applicationScope.catalog.categories}" />
<table align="left">
<tr><td valign="top">
<div class="messageBox">
<table>
<tr class="header">
<th colspan="4">Categories</th>
</tr>
<c:set var="i" value="0" />
<c:set var="selected" value="" />
<c:forEach var="item" items="${category}">
<c:set var="i" value="${i + 1}"/>
<c:if test="${i eq 1}">
<tr>
</c:if>
<c:choose>
<c:when test="${item.key eq categoryID}">
<c:set var="selected" value="#FF6633" />
</c:when>
<c:otherwise>
<c:set var="selected" value="" />
</c:otherwise>
</c:choose>
<td align="center" bgcolor="${selected}">
<a href="Catalogue?categoryID=${item.key}">
<img border="1" src="Pictures/${item.key}.jpg" alt="${item.value.categoryName}" /></a><br/>
<a href="Catalogue?categoryID=${item.key}"> ${item.value.categoryName} </a>
</td>
<c:if test="${i eq 2}">
</tr>
<c:set var="i" value="0" />
</c:if>
</c:forEach>
<c:if test="${i ne 0}">
</tr>
</c:if>
</table>
</div>
</td>
</tr>
</table>
</body>
</html>