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