forked from kishanrajput23/Java-Projects-Collections
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrowsebooks.jsp
42 lines (31 loc) · 823 Bytes
/
browsebooks.jsp
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
<html>
<style>
h2{color:navy;font:700 20pt arial}
h4 {color:brwon;font:700 11pt verdana}
td {font:10pt verdana}
a {font:12pt verdana;color:navy}
</style>
<body bgcolor="beige">
<h2>Browse Available Books</h2>
<form action="browsebooks.jsp" method="post" >
Select Category :
<select name="cat">
<option value="all">All Categories
<option value="ora">Oracle
<option value=".net">.NET
<option value="java">Java
</select>
<input type=submit value="Browse">
<a href="querybooks.jsp">Query Books </a> <a href="gohome.jsp">Home </a>
</form>
<%
String cat = request.getParameter("cat");
if ( cat == null)
request.setAttribute("cond","1=1");
else
if (!cat.equals("all") )
request.setAttribute("cond", "cat='" + cat + "'");
%>
<jsp:include page="listbooks.jsp" flush="true"/>
</body>
</html>