forked from Hari25cs/SaiJavaCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.jsp
More file actions
42 lines (29 loc) · 677 Bytes
/
index.jsp
File metadata and controls
42 lines (29 loc) · 677 Bytes
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
Exercise 7 from Exercises: Servlet and JSP Review
from Core Servlets and JSP Exercises.
-->
<HTML>
<HEAD>
<TITLE>Color Testing</TITLE>
</HEAD>
<%
String bgColor = "BLUE";
String myColor = request.getParameter("color");
if (myColor != null){
myColor = myColor;
}
else{
myColor = bgColor;
}
%>
<BODY BGCOLOR="<%= myColor %>">
<H2 ALIGN="CENTER">Color Testing</H2>
<form>
<input type="text" name="color" size="25">
<p></p>
<input type="submit" value="Submit">
<input type="reset" value="Reset">
</form>
</BODY>
</HTML>