This commit is contained in:
2024-11-30 19:03:49 +08:00
commit 1e6763c160
3806 changed files with 737676 additions and 0 deletions

View File

@@ -0,0 +1,116 @@
<HTML>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<HEAD>
<title>
colors.ColorGameBean Bean Properties
</title>
<BODY BGCOLOR="white">
<H2>
colors.ColorGameBean Bean Properties
</H2>
<HR>
<DL>
<DT>public class <B>ColorGameBean</B><DT>extends Object</DL>
<P>
<HR>
<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0">
<TR BGCOLOR="#EEEEFF">
<TD COLSPAN=3><FONT SIZE="+2">
<B>Properties Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white">
<td align="right" valign="top" width="1%">
<FONT SIZE="-1">
String
</FONT></TD>
<TD><B>ColorGameBean:color2</B>
<BR>
</TD>
<td width="1%">
<FONT SIZE="-1">
Single
</FONT></TD>
<TR BGCOLOR="white">
<td align="right" valign="top" width="1%">
<FONT SIZE="-1">
String
</FONT></TD>
<TD><B>ColorGameBean:color1</B>
<BR>
</TD>
<td width="1%">
<FONT SIZE="-1">
Single
</FONT></TD>
<TR BGCOLOR="white">
<td align="right" valign="top" width="1%">
<FONT SIZE="-1">
int
</FONT></TD>
<TD><B>ColorGameBean:attempts</B>
<BR>
</TD>
<td width="1%">
<FONT SIZE="-1">
Single
</FONT></TD>
<TR BGCOLOR="white">
<td align="right" valign="top" width="1%">
<FONT SIZE="-1">
boolean
</FONT></TD>
<TD><B>ColorGameBean:hint</B>
<BR>
</TD>
<td width="1%">
<FONT SIZE="-1">
Single
</FONT></TD>
<TR BGCOLOR="white">
<td align="right" valign="top" width="1%">
<FONT SIZE="-1">
boolean
</FONT></TD>
<TD><B>ColorGameBean:success</B>
<BR>
</TD>
<td width="1%">
<FONT SIZE="-1">
Single
</FONT></TD>
<TR BGCOLOR="white">
<td align="right" valign="top" width="1%">
<FONT SIZE="-1">
boolean
</FONT></TD>
<TD><B>ColorGameBean:hintTaken</B>
<BR>
</TD>
<td width="1%">
<FONT SIZE="-1">
Single
</FONT></TD>
</TABLE>
<HR>
</BODY>
</HTML>

View File

@@ -0,0 +1,34 @@
<html>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<p><font color="#0000FF"><a href="colors.html"><img src="../images/execute.gif" align="right" border="0"></a><a href="../index.html"><img src="../images/return.gif" width="24" height="24" align="right" border="0"></a></font></p>
<h3><a href="colrs.jsp.html">Source Code for Color Example<font color="#0000FF"></a>
</font> </h3>
<h3><a href="ColorGameBean.html">Property Sheet for ColorGameBean
<font color="#0000FF"></a> </font> </h3>
</body>
</html>

View File

@@ -0,0 +1,47 @@
<html>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<body bgcolor= white>
<font size=6 color=red>
<hr>
This web page is an example using JSP and BEANs.
<p>
Guess my favorite two colors
<p> If you fail to guess both of them - you get yellow on red.
<p> If you guess one of them right, either your foreground or
your background will change to the color that was guessed right.
<p> Guess them both right and your browser foreground/background
will change to my two favorite colors to display this page.
<hr>
<form method=GET action=colrs.jsp>
Color #1: <input type=text name= color1 size=16>
<br>
Color #2: <input type=text name= color2 size=16>
<p>
<input type=submit name=action value="Submit">
<input type=submit name=action value="Hint">
</form>
</font>
</body>
</html>

View File

@@ -0,0 +1,70 @@
<%--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--%>
<html>
<jsp:useBean id="cb" scope="session" class="colors.ColorGameBean" />
<jsp:setProperty name="cb" property="*" />
<%
cb.processRequest();
%>
<body bgcolor=<%= cb.getColor1() %>>
<font size=6 color=<%= cb.getColor2() %>>
<p>
<% if (cb.getHint()==true) { %>
<p> Hint #1: Vampires prey at night!
<p> <p> Hint #2: Nancy without the n.
<% } %>
<% if (cb.getSuccess()==true) { %>
<p> CONGRATULATIONS!!
<% if (cb.getHintTaken()==true) { %>
<p> ( although I know you cheated and peeked into the hints)
<% } %>
<% } %>
<p> Total attempts so far: <%= cb.getAttempts() %>
<p>
<p>
<form method=POST action=colrs.jsp>
Color #1: <input type=text name= color1 size=16>
<br>
Color #2: <input type=text name= color2 size=16>
<p>
<input type=submit name=action value="Submit">
<input type=submit name=action value="Hint">
</form>
</font>
</body>
</html>