source: nutchez-0.1/tomcat/webapps/examples/jsp/cal/cal1.jsp.html @ 77

Last change on this file since 77 was 66, checked in by waue, 16 years ago

NutchEz - an easy way to nutch

File size: 2.4 KB
Line 
1<html><body><pre>
2&lt;HTML>
3&lt;!--
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&lt;HEAD>&lt;TITLE>
20  Calendar: A JSP APPLICATION
21&lt;/TITLE>&lt;/HEAD>
22
23
24&lt;BODY BGCOLOR="white">
25
26&lt;%@ page language="java" import="cal.*" %>
27&lt;jsp:useBean id="table" scope="session" class="cal.TableBean" />
28
29&lt;%
30  table.processRequest(request);
31  if (table.getProcessError() == false) {
32%>
33
34&lt;!-- html table goes here -->
35&lt;CENTER>
36&lt;TABLE WIDTH=60% BGCOLOR=yellow CELLPADDING=15>
37&lt;TR>
38&lt;TD ALIGN=CENTER> &lt;A HREF=cal1.jsp?date=prev> prev &lt;/A>
39&lt;TD ALIGN=CENTER> Calendar:&lt;%= table.getDate() %>&lt;/TD>
40&lt;TD ALIGN=CENTER> &lt;A HREF=cal1.jsp?date=next> next &lt;/A>
41&lt;/TR>
42&lt;/TABLE>
43
44&lt;!-- the main table -->
45&lt;TABLE WIDTH=60% BGCOLOR=lightblue BORDER=1 CELLPADDING=10>
46&lt;TR>
47&lt;TH> Time &lt;/TH>
48&lt;TH> Appointment &lt;/TH>
49&lt;/TR>
50&lt;FORM METHOD=POST ACTION=cal1.jsp>
51&lt;%
52  for(int i=0; i&lt;table.getEntries().getRows(); i++) {
53     cal.Entry entr = table.getEntries().getEntry(i);
54%>
55  &lt;TR>
56  &lt;TD>
57  &lt;A HREF=cal2.jsp?time=&lt;%= entr.getHour() %>>
58    &lt;%= entr.getHour() %> &lt;/A>
59  &lt;/TD>
60  &lt;TD BGCOLOR=&lt;%= entr.getColor() %>>
61  &lt;% out.print(util.HTMLFilter.filter(entr.getDescription())); %>
62  &lt;/TD>
63  &lt;/TR>
64&lt;%
65  }
66%>
67&lt;/FORM>
68&lt;/TABLE>
69&lt;BR>
70
71&lt;!-- footer -->
72&lt;TABLE WIDTH=60% BGCOLOR=yellow CELLPADDING=15>
73&lt;TR>
74&lt;TD ALIGN=CENTER>  &lt;% out.print(util.HTMLFilter.filter(table.getName())); %> :
75         &lt;% out.print(util.HTMLFilter.filter(table.getEmail())); %> &lt;/TD>
76&lt;/TR>
77&lt;/TABLE>
78&lt;/CENTER>
79
80&lt;%
81  } else {
82%>
83&lt;font size=5>
84  You must enter your name and email address correctly.
85&lt;/font>
86&lt;%
87  }
88%>
89
90
91&lt;/BODY>
92&lt;/HTML>
93
94
95
96
97</pre></body></html>
Note: See TracBrowser for help on using the repository browser.