1 | <html> |
---|
2 | <!-- |
---|
3 | Licensed to the Apache Software Foundation (ASF) under one or more |
---|
4 | contributor license agreements. See the NOTICE file distributed with |
---|
5 | this work for additional information regarding copyright ownership. |
---|
6 | The ASF licenses this file to You under the Apache License, Version 2.0 |
---|
7 | (the "License"); you may not use this file except in compliance with |
---|
8 | the License. You may obtain a copy of the License at |
---|
9 | |
---|
10 | http://www.apache.org/licenses/LICENSE-2.0 |
---|
11 | |
---|
12 | Unless required by applicable law or agreed to in writing, software |
---|
13 | distributed under the License is distributed on an "AS IS" BASIS, |
---|
14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
15 | See the License for the specific language governing permissions and |
---|
16 | limitations under the License. |
---|
17 | --> |
---|
18 | |
---|
19 | <jsp:useBean id="cb" scope="session" class="colors.ColorGameBean" /> |
---|
20 | <jsp:setProperty name="cb" property="*" /> |
---|
21 | |
---|
22 | <% |
---|
23 | cb.processRequest(request); |
---|
24 | %> |
---|
25 | |
---|
26 | <body bgcolor=<%= cb.getColor1() %>> |
---|
27 | <font size=6 color=<%= cb.getColor2() %>> |
---|
28 | <p> |
---|
29 | |
---|
30 | <% if (cb.getHint()==true) { %> |
---|
31 | |
---|
32 | <p> Hint #1: Vampires prey at night! |
---|
33 | <p> <p> Hint #2: Nancy without the n. |
---|
34 | |
---|
35 | <% } %> |
---|
36 | |
---|
37 | <% if (cb.getSuccess()==true) { %> |
---|
38 | |
---|
39 | <p> CONGRATULATIONS!! |
---|
40 | <% if (cb.getHintTaken()==true) { %> |
---|
41 | |
---|
42 | <p> ( although I know you cheated and peeked into the hints) |
---|
43 | |
---|
44 | <% } %> |
---|
45 | |
---|
46 | <% } %> |
---|
47 | |
---|
48 | <p> Total attempts so far: <%= cb.getAttempts() %> |
---|
49 | <p> |
---|
50 | |
---|
51 | <p> |
---|
52 | |
---|
53 | <form method=POST action=colrs.jsp> |
---|
54 | |
---|
55 | Color #1: <input type=text name= color1 size=16> |
---|
56 | |
---|
57 | <br> |
---|
58 | |
---|
59 | Color #2: <input type=text name= color2 size=16> |
---|
60 | |
---|
61 | <p> |
---|
62 | |
---|
63 | <input type=submit name=action value="Submit"> |
---|
64 | <input type=submit name=action value="Hint"> |
---|
65 | |
---|
66 | </form> |
---|
67 | |
---|
68 | </font> |
---|
69 | </body> |
---|
70 | </html> |
---|