File: index.html

package info (click to toggle)
tomcat7 7.0.75-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 31,044 kB
  • sloc: java: 261,799; xml: 56,572; jsp: 3,087; sh: 1,383; perl: 269; makefile: 121
file content (180 lines) | stat: -rw-r--r-- 6,959 bytes parent folder | download | duplicates (2)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<!--
 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.
-->
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="GENERATOR" content="Mozilla/4.61 [en] (WinNT; I) [Netscape]">
   <meta name="Author" content="Anil K. Vijendran">
   <title>Servlet Examples</title>
</head>
<body bgcolor="#FFFFFF">
<b><font face="Arial, Helvetica, sans-serif"><font size=+2>Servlet
Examples with Code</font></font></b>
<p>This is a collection of examples which demonstrate some of the more
frequently used parts of the Servlet API. Familiarity with the Java(tm)
Programming Language is assumed.
<p>These examples will only work when viewed via an http URL. They will
not work if you are viewing these pages via a "file://..." URL. Please
refer to the <i>README</i> file provide with this Tomcat release regarding
how to configure and start the provided web server.
<p>Wherever you see a form, enter some data and see how the servlet reacts.
When playing with the Cookie and Session Examples, jump back to the Headers
Example to see exactly what your browser is sending the server.
<p>To navigate your way through the examples, the following icons will
help:
<br>&nbsp;
<table BORDER=0 CELLSPACING=5 WIDTH="85%" >
<tr VALIGN=TOP>
<td WIDTH="30"><img SRC="images/execute.gif" ></td>

<td>Execute the example</td>
</tr>

<tr VALIGN=TOP>
<td WIDTH="30"><img SRC="images/code.gif" height=24 width=24></td>

<td>Look at the source code for the example</td>
</tr>

<tr VALIGN=TOP>
<td WIDTH="30"><img SRC="images/return.gif" height=24 width=24></td>

<td>Return to this screen</td>
</tr>
</table>

<p>Tip: To see the cookie interactions with your browser, try turning on
the "notify when setting a cookie" option in your browser preferences.
This will let you see when a session is created and give some feedback
when looking at the cookie demo.
<br>&nbsp;
<table BORDER=0 CELLSPACING=5 WIDTH="85%" >
<tr VALIGN=TOP>
<td>Hello World</td>

<td VALIGN=TOP WIDTH="30%"><a href="servlet/HelloWorldExample"><img SRC="images/execute.gif" HSPACE=4 BORDER=0  align=TOP></a><a href="servlet/HelloWorldExample">Execute</a></td>

<td WIDTH="30%"><a href="helloworld.html"><img SRC="images/code.gif" HSPACE=4 BORDER=0 height=24 width=24 align=TOP></a><a href="helloworld.html">Source</a></td>
</tr>

<tr VALIGN=TOP>
<td>Request Info</td>

<td WIDTH="30%"><a href="servlet/RequestInfoExample"><img SRC="images/execute.gif" HSPACE=4 BORDER=0  align=TOP></a><a href="servlet/RequestInfoExample">Execute</a></td>

<td WIDTH="30%"><a href="reqinfo.html"><img SRC="images/code.gif" HSPACE=4 BORDER=0 height=24 width=24 align=TOP></a><a href="reqinfo.html">Source</a></td>
</tr>

<tr VALIGN=TOP>
<td>Request Headers</td>

<td WIDTH="30%"><a href="servlet/RequestHeaderExample"><img SRC="images/execute.gif" HSPACE=4 BORDER=0  align=TOP></a><a href="servlet/RequestHeaderExample">Execute</a></td>

<td WIDTH="30%"><a href="reqheaders.html"><img SRC="images/code.gif" HSPACE=4 BORDER=0 height=24 width=24 align=TOP></a><a href="reqheaders.html">Source</a></td>
</tr>

<tr VALIGN=TOP>
<td>Request Parameters</td>

<td WIDTH="30%"><a href="servlet/RequestParamExample"><img SRC="images/execute.gif" HSPACE=4 BORDER=0  align=TOP></a><a href="servlet/RequestParamExample">Execute</a></td>

<td WIDTH="30%"><a href="reqparams.html"><img SRC="images/code.gif" HSPACE=4 BORDER=0 height=24 width=24 align=TOP></a><a href="reqparams.html">Source</a></td>
</tr>

<tr VALIGN=TOP>
<td>Cookies</td>

<td WIDTH="30%"><a href="servlet/CookieExample"><img SRC="images/execute.gif" HSPACE=4 BORDER=0  align=TOP></a><a href="servlet/CookieExample">Execute</a></td>

<td WIDTH="30%"><a href="cookies.html"><img SRC="images/code.gif" HSPACE=4 BORDER=0 height=24 width=24 align=TOP></a><a href="cookies.html">Source</a></td>
</tr>

<tr VALIGN=TOP>
<td>Sessions</td>

<td WIDTH="30%"><a href="servlet/SessionExample"><img SRC="images/execute.gif" HSPACE=4 BORDER=0  align=TOP></a><a href="servlet/SessionExample">Execute</a></td>

<td WIDTH="30%"><a href="sessions.html"><img SRC="images/code.gif" HSPACE=4 BORDER=0 height=24 width=24 align=TOP></a><a href="sessions.html">Source</a></td>
</tr>
</table>

<p>Note: The source code for these examples does not contain all of the
source code that is actually in the example, only the important sections
of code. Code not important to understand the example has been removed
for clarity.</p>

<b><u><font size="+1">Other Examples</font></u></b><br>
<table BORDER=0 CELLSPACING=5 WIDTH="85%" >

<tr>
  <td colspan="3">Servlet 3.0 Asynchronous processing examples:</td>
</tr>
<tr VALIGN=TOP>
  <td>async0&nbsp;</td>
  <td VALIGN=TOP WIDTH="30%">
    <a href="../async/async0"><img SRC="images/execute.gif" HSPACE=4 BORDER=0 align=TOP> Execute</a>
  </td>
  <td WIDTH="30%"></td>
</tr>
<tr VALIGN=TOP>
  <td>async1&nbsp;</td>
  <td VALIGN=TOP WIDTH="30%">
    <a href="../async/async1"><img SRC="images/execute.gif" HSPACE=4 BORDER=0 align=TOP> Execute</a>
  </td>
  <td WIDTH="30%"></td>
</tr>
<tr VALIGN=TOP>
  <td>async2&nbsp;</td>
  <td VALIGN=TOP WIDTH="30%">
    <a href="../async/async2"><img SRC="images/execute.gif" HSPACE=4 BORDER=0 align=TOP> Execute</a>
  </td>
  <td WIDTH="30%"></td>
</tr>
<tr VALIGN=TOP>
  <td>async3&nbsp;</td>
  <td VALIGN=TOP WIDTH="30%">
    <a href="../async/async3"><img SRC="images/execute.gif" HSPACE=4 BORDER=0 align=TOP> Execute</a>
  </td>
  <td WIDTH="30%"></td>
</tr>
<tr VALIGN=TOP>
  <td>stockticker&nbsp;</td>
  <td VALIGN=TOP WIDTH="30%">
    <a href="../async/stockticker"><img SRC="images/execute.gif" HSPACE=4 BORDER=0 align=TOP> Execute</a>
  </td>
  <td WIDTH="30%"></td>
</tr>

<tr>
  <td colspan="3">Comet processing example:<br />
    See the <strong>"Advanced IO"</strong> chapter in the User Guide for
    details. This example only works with the HTTP NIO or HTTP APR/native
    connectors as these are the only connectors that support Comet.</td>
</tr>
<tr VALIGN=TOP>
  <td>Comet Chat&nbsp;</td>
  <td VALIGN=TOP WIDTH="30%">
    <a href="chat/"><img SRC="images/execute.gif" HSPACE=4 BORDER=0 align=TOP> Execute</a>
  </td>
  <td WIDTH="30%"></td>
</tr>

</table>

</body>
</html>