capistrano-tomcat 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/HISTORY.txt ADDED
@@ -0,0 +1,9 @@
1
+ v0.0.2
2
+ ======
3
+ * Deploys to a machine with RedHat Enterprise Linux and the `tomcat6` package.
4
+
5
+ v0.0.1
6
+ ======
7
+ * Initial release.
8
+ * Actually a broken pre-release version, whoops.
9
+
data/README.markdown ADDED
@@ -0,0 +1,23 @@
1
+ # Tomcat extensions for Capistrano
2
+
3
+
4
+ ## Usage
5
+
6
+ In your Rails app's deployment recipe (`config/deploy.rb`):
7
+
8
+ require 'capistrano/tomcat'
9
+
10
+ Then, once you have built your WAR into `artifacts/appname.war`,
11
+ you can use the Capistrano deployment as you would for Passenger.
12
+
13
+ $ rake package
14
+ $ cap deploy:setup
15
+ $ cap deploy
16
+
17
+ ## Configuration
18
+
19
+ `tomcat_base_port` controls the other ports as well.
20
+ `tomcat_http_port`
21
+ `tomcat_https_port`
22
+ `tomcat_ajp_port`
23
+
@@ -2,15 +2,76 @@ configuration = Capistrano::Configuration.respond_to?(:instance) ?
2
2
  Capistrano::Configuration.instance(:must_exist) :
3
3
  Capistrano.configuration(:must_exist)
4
4
 
5
- set(:war_filename) { "#{app_name}.war" }
6
-
7
5
  configuration.load do
6
+ set(:war_filename) { "#{application}.war" }
7
+ _cset :tomcat_base_port, 8005
8
+ _cset(:tomcat_ajp_port) { tomcat_base_port + 4 } #8009
9
+ _cset(:tomcat_http_port) { tomcat_base_port + 75 } #8080
10
+ _cset(:tomcat_https_port) { tomcat_base_port + 443 } #8443
11
+ _cset :keystore_password, nil
12
+ _cset :catalina_home, '/usr/share/tomcat6'
13
+
8
14
  namespace :deploy do
9
15
  task :update_code, :roles => :app do
16
+ on_rollback { run "rm -rf -- \"#{release_path}\"" }
17
+
18
+ create_tomcat_directory_structure_under release_path
10
19
  source_war_path = "artifacts/#{war_filename}"
11
- target_war_path = File.join(current_path, war_filename)
20
+ target_war_path = File.join(release_path, 'webapps', war_filename)
12
21
  top.upload source_war_path, target_war_path
13
22
  end
23
+
24
+ task :finalize_update do
25
+ # no finalization necessary with a WAR deployment
26
+ end
27
+
28
+ task :start, :roles => :app do
29
+ run_tomcat_command 'start'
30
+ end
31
+ task :stop, :roles => :app do
32
+ run_tomcat_command 'stop'
33
+ end
34
+ task :restart, :roles => :app do
35
+ run_tomcat_command 'stop'
36
+ run_tomcat_command 'start'
37
+ end
38
+
39
+ def run_tomcat_command cmd
40
+ log = File.join(shared_path, "log", "deploy.log")
41
+ tmpdir = File.join(current_path, "temp")
42
+ run "/usr/sbin/tomcat6 #{cmd} #{log}", :env => {
43
+ "CATALINA_HOME" => catalina_home,
44
+ "CATALINA_BASE" => current_path,
45
+ "CATALINA_TMPDIR" => tmpdir
46
+ }
47
+ end
48
+ end
49
+
50
+ def create_tomcat_directory_structure_under base
51
+ dirs = [release_path,
52
+ File.join(release_path, 'webapps'),
53
+ File.join(release_path, 'conf'),
54
+ File.join(release_path, 'work'),
55
+ File.join(release_path, 'temp')
56
+ ]
57
+ run <<-SH
58
+ #{try_sudo} mkdir -p #{dirs.join ' '} && \
59
+ #{try_sudo} cp -r \"#{catalina_home}/conf\"/* \"#{release_path}/conf/\" && \
60
+ #{try_sudo} ln -s #{File.join shared_path, "log"} #{File.join release_path, "logs"}
61
+ SH
62
+
63
+ upload_templated_config 'server.xml', :remote_base => base
64
+ upload_templated_config 'web.xml', :remote_base => base
65
+ end
66
+
67
+ def upload_templated_config filename, options
68
+ base = options[:remote_base] or raise ArgumentError "no base specified"
69
+
70
+ destination_path = File.join(base, 'conf', filename)
71
+ template_filename = File.join(File.dirname(__FILE__), "tomcat", "templates", "#{filename}.erb")
72
+ template = File.read(template_filename)
73
+ result = ERB.new(template).result(binding)
74
+ put result, destination_path, :mode => 0644
14
75
  end
15
76
  end
16
77
 
@@ -0,0 +1,149 @@
1
+ <?xml version='1.0' encoding='utf-8'?>
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
+ <!-- Note: A "Server" is not itself a "Container", so you may not
19
+ define subcomponents such as "Valves" at this level.
20
+ Documentation at /docs/config/server.html
21
+ -->
22
+ <Server port="<%= tomcat_base_port %>" shutdown="SHUTDOWN">
23
+
24
+ <!--APR library loader. Documentation at /docs/apr.html -->
25
+ <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
26
+ <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
27
+ <Listener className="org.apache.catalina.core.JasperListener" />
28
+ <!-- Prevent memory leaks due to use of particular java/javax APIs-->
29
+ <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
30
+ <!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
31
+ <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
32
+ <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
33
+
34
+ <!-- Global JNDI resources
35
+ Documentation at /docs/jndi-resources-howto.html
36
+ -->
37
+ <GlobalNamingResources>
38
+ <!-- Editable user database that can also be used by
39
+ UserDatabaseRealm to authenticate users
40
+ -->
41
+ <Resource name="UserDatabase" auth="Container"
42
+ type="org.apache.catalina.UserDatabase"
43
+ description="User database that can be updated and saved"
44
+ factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
45
+ pathname="conf/tomcat-users.xml" />
46
+ </GlobalNamingResources>
47
+
48
+ <!-- A "Service" is a collection of one or more "Connectors" that share
49
+ a single "Container" Note: A "Service" is not itself a "Container",
50
+ so you may not define subcomponents such as "Valves" at this level.
51
+ Documentation at /docs/config/service.html
52
+ -->
53
+ <Service name="Catalina">
54
+
55
+ <!--The connectors can use a shared executor, you can define one or more named thread pools-->
56
+ <!--
57
+ <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
58
+ maxThreads="150" minSpareThreads="4"/>
59
+ -->
60
+
61
+
62
+ <!-- A "Connector" represents an endpoint by which requests are received
63
+ and responses are returned. Documentation at :
64
+ Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
65
+ Java AJP Connector: /docs/config/ajp.html
66
+ APR (HTTP/AJP) Connector: /docs/apr.html
67
+ Define a non-SSL HTTP/1.1 Connector on port <%= tomcat_http_port %>
68
+ -->
69
+ <Connector port="<%= tomcat_http_port %>" protocol="HTTP/1.1"
70
+ connectionTimeout="20000"
71
+ redirectPort="<%= tomcat_https_port %>" />
72
+ <!-- A "Connector" using the shared thread pool-->
73
+ <!--
74
+ <Connector executor="tomcatThreadPool"
75
+ port="<%= tomcat_http_port %>" protocol="HTTP/1.1"
76
+ connectionTimeout="20000"
77
+ redirectPort="<%= tomcat_https_port %>" />
78
+ -->
79
+ <!-- Define a SSL HTTP/1.1 Connector on port <%= tomcat_https_port %>
80
+ This connector uses the JSSE configuration, when using APR, the
81
+ connector should be using the OpenSSL style configuration
82
+ described in the APR documentation -->
83
+ <!--
84
+ <Connector port="<%= tomcat_https_port %>" protocol="HTTP/1.1" SSLEnabled="true"
85
+ maxThreads="150" scheme="https" secure="true"
86
+ clientAuth="false" sslProtocol="TLS" />
87
+ -->
88
+
89
+ <% if tomcat_ajp_port %>
90
+ <!-- Define an AJP 1.3 Connector on port 8009 -->
91
+ <Connector port="<%= tomcat_ajp_port %>" protocol="AJP/1.3" redirectPort="<%= tomcat_https_port %>" />
92
+ <% end %>
93
+
94
+ <!-- An Engine represents the entry point (within Catalina) that processes
95
+ every request. The Engine implementation for Tomcat stand alone
96
+ analyzes the HTTP headers included with the request, and passes them
97
+ on to the appropriate Host (virtual host).
98
+ Documentation at /docs/config/engine.html -->
99
+
100
+ <!-- You should set jvmRoute to support load-balancing via AJP ie :
101
+ <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
102
+ -->
103
+ <Engine name="Catalina" defaultHost="localhost">
104
+
105
+ <!--For clustering, please take a look at documentation at:
106
+ /docs/cluster-howto.html (simple how to)
107
+ /docs/config/cluster.html (reference documentation) -->
108
+ <!--
109
+ <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
110
+ -->
111
+
112
+ <!-- The request dumper valve dumps useful debugging information about
113
+ the request and response data received and sent by Tomcat.
114
+ Documentation at: /docs/config/valve.html -->
115
+ <!--
116
+ <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
117
+ -->
118
+
119
+ <!-- This Realm uses the UserDatabase configured in the global JNDI
120
+ resources under the key "UserDatabase". Any edits
121
+ that are performed against this UserDatabase are immediately
122
+ available for use by the Realm. -->
123
+ <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
124
+ resourceName="UserDatabase"/>
125
+
126
+ <!-- Define the default virtual host
127
+ Note: XML Schema validation will not work with Xerces 2.2.
128
+ -->
129
+ <Host name="localhost" appBase="webapps"
130
+ unpackWARs="true" autoDeploy="true"
131
+ xmlValidation="false" xmlNamespaceAware="false">
132
+
133
+ <!-- SingleSignOn valve, share authentication between web applications
134
+ Documentation at: /docs/config/valve.html -->
135
+ <!--
136
+ <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
137
+ -->
138
+
139
+ <!-- Access log processes all example.
140
+ Documentation at: /docs/config/valve.html -->
141
+ <!--
142
+ <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
143
+ prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
144
+ -->
145
+
146
+ </Host>
147
+ </Engine>
148
+ </Service>
149
+ </Server>
@@ -0,0 +1,1205 @@
1
+ <?xml version="1.0" encoding="ISO-8859-1"?>
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
+ <web-app xmlns="http://java.sun.com/xml/ns/javaee"
19
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
21
+ version="2.5">
22
+
23
+ <!-- ======================== Introduction ============================== -->
24
+ <!-- This document defines default values for *all* web applications -->
25
+ <!-- loaded into this instance of Tomcat. As each application is -->
26
+ <!-- deployed, this file is processed, followed by the -->
27
+ <!-- "/WEB-INF/web.xml" deployment descriptor from your own -->
28
+ <!-- applications. -->
29
+ <!-- -->
30
+ <!-- WARNING: Do not configure application-specific resources here! -->
31
+ <!-- They should go in the "/WEB-INF/web.xml" file in your application. -->
32
+
33
+
34
+ <!-- ================== Built In Servlet Definitions ==================== -->
35
+
36
+
37
+ <!-- The default servlet for all web applications, that serves static -->
38
+ <!-- resources. It processes all requests that are not mapped to other -->
39
+ <!-- servlets with servlet mappings (defined either here or in your own -->
40
+ <!-- web.xml file). This servlet supports the following initialization -->
41
+ <!-- parameters (default values are in square brackets): -->
42
+ <!-- -->
43
+ <!-- debug Debugging detail level for messages logged -->
44
+ <!-- by this servlet. [0] -->
45
+ <!-- -->
46
+ <!-- fileEncoding Encoding to be used to read static resources -->
47
+ <!-- [platform default] -->
48
+ <!-- -->
49
+ <!-- input Input buffer size (in bytes) when reading -->
50
+ <!-- resources to be served. [2048] -->
51
+ <!-- -->
52
+ <!-- listings Should directory listings be produced if there -->
53
+ <!-- is no welcome file in this directory? [false] -->
54
+ <!-- WARNING: Listings for directories with many -->
55
+ <!-- entries can be slow and may consume -->
56
+ <!-- significant proportions of server resources. -->
57
+ <!-- -->
58
+ <!-- output Output buffer size (in bytes) when writing -->
59
+ <!-- resources to be served. [2048] -->
60
+ <!-- -->
61
+ <!-- readonly Is this context "read only", so HTTP -->
62
+ <!-- commands like PUT and DELETE are -->
63
+ <!-- rejected? [true] -->
64
+ <!-- -->
65
+ <!-- readmeFile File name to display with the directory -->
66
+ <!-- contents. [null] -->
67
+ <!-- -->
68
+ <!-- sendfileSize If the connector used supports sendfile, this -->
69
+ <!-- represents the minimal file size in KB for -->
70
+ <!-- which sendfile will be used. Use a negative -->
71
+ <!-- value to always disable sendfile. [48] -->
72
+ <!-- -->
73
+ <!-- useAcceptRanges Should the Accept-Ranges header be included -->
74
+ <!-- in responses where appropriate? [true] -->
75
+ <!-- -->
76
+ <!-- For directory listing customization. Checks localXsltFile, then -->
77
+ <!-- globalXsltFile, then defaults to original behavior. -->
78
+ <!-- -->
79
+ <!-- localXsltFile Make directory listings an XML doc and -->
80
+ <!-- pass the result to this style sheet residing -->
81
+ <!-- in that directory. This overrides -->
82
+ <!-- contextXsltFile and globalXsltFile[null] -->
83
+ <!-- -->
84
+ <!-- contextXsltFile Make directory listings an XML doc and -->
85
+ <!-- pass the result to this style sheet which is -->
86
+ <!-- relative to the context root. This overrides -->
87
+ <!-- globalXsltFile[null] -->
88
+ <!-- -->
89
+ <!-- globalXsltFile Site wide configuration version of -->
90
+ <!-- localXsltFile This argument is expected -->
91
+ <!-- to be a physical file. [null] -->
92
+ <!-- -->
93
+ <!-- -->
94
+
95
+ <servlet>
96
+ <servlet-name>default</servlet-name>
97
+ <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
98
+ <init-param>
99
+ <param-name>debug</param-name>
100
+ <param-value>0</param-value>
101
+ </init-param>
102
+ <init-param>
103
+ <param-name>listings</param-name>
104
+ <param-value>false</param-value>
105
+ </init-param>
106
+ <load-on-startup>1</load-on-startup>
107
+ </servlet>
108
+
109
+
110
+ <!-- This servlet has been deprecated due to security concerns. Servlets -->
111
+ <!-- should be explicitly mapped in web.xml -->
112
+ <!-- -->
113
+ <!-- The "invoker" servlet, which executes anonymous servlet classes -->
114
+ <!-- that have not been defined in a web.xml file. Traditionally, this -->
115
+ <!-- servlet is mapped to the URL pattern "/servlet/*", but you can map -->
116
+ <!-- it to other patterns as well. The extra path info portion of such a -->
117
+ <!-- request must be the fully qualified class name of a Java class that -->
118
+ <!-- implements Servlet (or extends HttpServlet), or the servlet name -->
119
+ <!-- of an existing servlet definition. This servlet supports the -->
120
+ <!-- following initialization parameters (default values are in square -->
121
+ <!-- brackets): -->
122
+ <!-- -->
123
+ <!-- debug Debugging detail level for messages logged -->
124
+ <!-- by this servlet. [0] -->
125
+
126
+ <!--
127
+ <servlet>
128
+ <servlet-name>invoker</servlet-name>
129
+ <servlet-class>
130
+ org.apache.catalina.servlets.InvokerServlet
131
+ </servlet-class>
132
+ <init-param>
133
+ <param-name>debug</param-name>
134
+ <param-value>0</param-value>
135
+ </init-param>
136
+ <load-on-startup>2</load-on-startup>
137
+ </servlet>
138
+ -->
139
+
140
+
141
+ <!-- The JSP page compiler and execution servlet, which is the mechanism -->
142
+ <!-- used by Tomcat to support JSP pages. Traditionally, this servlet -->
143
+ <!-- is mapped to the URL pattern "*.jsp". This servlet supports the -->
144
+ <!-- following initialization parameters (default values are in square -->
145
+ <!-- brackets): -->
146
+ <!-- -->
147
+ <!-- checkInterval If development is false and checkInterval is -->
148
+ <!-- greater than zero, background compilations are -->
149
+ <!-- enabled. checkInterval is the time in seconds -->
150
+ <!-- between checks to see if a JSP page (and its -->
151
+ <!-- dependent files) needs to be recompiled. [0] -->
152
+ <!-- -->
153
+ <!-- classdebuginfo Should the class file be compiled with -->
154
+ <!-- debugging information? [true] -->
155
+ <!-- -->
156
+ <!-- classpath What class path should I use while compiling -->
157
+ <!-- generated servlets? [Created dynamically -->
158
+ <!-- based on the current web application] -->
159
+ <!-- -->
160
+ <!-- compiler Which compiler Ant should use to compile JSP -->
161
+ <!-- pages. See the jasper documentation for more -->
162
+ <!-- information. -->
163
+ <!-- -->
164
+ <!-- compilerSourceVM Compiler source VM. [1.5] -->
165
+ <!-- -->
166
+ <!-- compilerTargetVM Compiler target VM. [1.5] -->
167
+ <!-- -->
168
+ <!-- development Is Jasper used in development mode? If true, -->
169
+ <!-- the frequency at which JSPs are checked for -->
170
+ <!-- modification may be specified via the -->
171
+ <!-- modificationTestInterval parameter. [true] -->
172
+ <!-- -->
173
+ <!-- displaySourceFragment -->
174
+ <!-- Should a source fragment be included in -->
175
+ <!-- exception messages? [true] -->
176
+ <!-- -->
177
+ <!-- dumpSmap Should the SMAP info for JSR45 debugging be -->
178
+ <!-- dumped to a file? [false] -->
179
+ <!-- False if suppressSmap is true -->
180
+ <!-- -->
181
+ <!-- enablePooling Determines whether tag handler pooling is -->
182
+ <!-- enabled. This is a compilation option. It will -->
183
+ <!-- not alter the behaviour of JSPs that have -->
184
+ <!-- already been compiled. [true] -->
185
+ <!-- -->
186
+ <!-- engineOptionsClass Allows specifying the Options class used to -->
187
+ <!-- configure Jasper. If not present, the default -->
188
+ <!-- EmbeddedServletOptions will be used. -->
189
+ <!-- -->
190
+ <!-- errorOnUseBeanInvalidClassAttribute -->
191
+ <!-- Should Jasper issue an error when the value of -->
192
+ <!-- the class attribute in an useBean action is -->
193
+ <!-- not a valid bean class? [true] -->
194
+ <!-- -->
195
+ <!-- fork Tell Ant to fork compiles of JSP pages so that -->
196
+ <!-- a separate JVM is used for JSP page compiles -->
197
+ <!-- from the one Tomcat is running in. [true] -->
198
+ <!-- -->
199
+ <!-- genStrAsCharArray Should text strings be generated as char -->
200
+ <!-- arrays, to improve performance in some cases? -->
201
+ <!-- [false] -->
202
+ <!-- -->
203
+ <!-- ieClassId The class-id value to be sent to Internet -->
204
+ <!-- Explorer when using <jsp:plugin> tags. -->
205
+ <!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] -->
206
+ <!-- -->
207
+ <!-- javaEncoding Java file encoding to use for generating java -->
208
+ <!-- source files. [UTF8] -->
209
+ <!-- -->
210
+ <!-- keepgenerated Should we keep the generated Java source code -->
211
+ <!-- for each page instead of deleting it? [true] -->
212
+ <!-- -->
213
+ <!-- mappedfile Should we generate static content with one -->
214
+ <!-- print statement per input line, to ease -->
215
+ <!-- debugging? [true] -->
216
+ <!-- -->
217
+ <!-- modificationTestInterval -->
218
+ <!-- Causes a JSP (and its dependent files) to not -->
219
+ <!-- be checked for modification during the -->
220
+ <!-- specified time interval (in seconds) from the -->
221
+ <!-- last time the JSP was checked for -->
222
+ <!-- modification. A value of 0 will cause the JSP -->
223
+ <!-- to be checked on every access. -->
224
+ <!-- Used in development mode only. [4] -->
225
+ <!-- -->
226
+ <!-- recompileOnFail If a JSP compilation fails should the -->
227
+ <!-- modificationTestInterval be ignored and the -->
228
+ <!-- next access trigger a re-compilation attempt? -->
229
+ <!-- Used in development mode only and is disabled -->
230
+ <!-- by default as compilation may be expensive and -->
231
+ <!-- could lead to excessive resource usage. -->
232
+ <!-- [false] -->
233
+ <!-- -->
234
+ <!-- scratchdir What scratch directory should we use when -->
235
+ <!-- compiling JSP pages? [default work directory -->
236
+ <!-- for the current web application] -->
237
+ <!-- -->
238
+ <!-- suppressSmap Should the generation of SMAP info for JSR45 -->
239
+ <!-- debugging be suppressed? [false] -->
240
+ <!-- -->
241
+ <!-- trimSpaces Should white spaces in template text between -->
242
+ <!-- actions or directives be trimmed? [false] -->
243
+ <!-- -->
244
+ <!-- xpoweredBy Determines whether X-Powered-By response -->
245
+ <!-- header is added by generated servlet [false] -->
246
+ <!-- -->
247
+ <!-- If you wish to use Jikes to compile JSP pages: -->
248
+ <!-- Please see the "Using Jikes" section of the Jasper-HowTo -->
249
+ <!-- page in the Tomcat documentation. -->
250
+
251
+ <servlet>
252
+ <servlet-name>jsp</servlet-name>
253
+ <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
254
+ <init-param>
255
+ <param-name>fork</param-name>
256
+ <param-value>false</param-value>
257
+ </init-param>
258
+ <init-param>
259
+ <param-name>xpoweredBy</param-name>
260
+ <param-value>false</param-value>
261
+ </init-param>
262
+ <load-on-startup>3</load-on-startup>
263
+ </servlet>
264
+
265
+
266
+ <!-- NOTE: An SSI Filter is also available as an alternative SSI -->
267
+ <!-- implementation. Use either the Servlet or the Filter but NOT both. -->
268
+ <!-- -->
269
+ <!-- Server Side Includes processing servlet, which processes SSI -->
270
+ <!-- directives in HTML pages consistent with similar support in web -->
271
+ <!-- servers like Apache. Traditionally, this servlet is mapped to the -->
272
+ <!-- URL pattern "*.shtml". This servlet supports the following -->
273
+ <!-- initialization parameters (default values are in square brackets): -->
274
+ <!-- -->
275
+ <!-- buffered Should output from this servlet be buffered? -->
276
+ <!-- (0=false, 1=true) [0] -->
277
+ <!-- -->
278
+ <!-- debug Debugging detail level for messages logged -->
279
+ <!-- by this servlet. [0] -->
280
+ <!-- -->
281
+ <!-- expires The number of seconds before a page with SSI -->
282
+ <!-- directives will expire. [No default] -->
283
+ <!-- -->
284
+ <!-- isVirtualWebappRelative -->
285
+ <!-- Should "virtual" paths be interpreted as -->
286
+ <!-- relative to the context root, instead of -->
287
+ <!-- the server root? (0=false, 1=true) [0] -->
288
+ <!-- -->
289
+ <!-- inputEncoding The encoding to assume for SSI resources if -->
290
+ <!-- one is not available from the resource. -->
291
+ <!-- [Platform default] -->
292
+ <!-- -->
293
+ <!-- outputEncoding The encoding to use for the page that results -->
294
+ <!-- from the SSI processing. [UTF-8] -->
295
+ <!-- -->
296
+ <!-- allowExec Is use of the exec command enabled? [false] -->
297
+
298
+ <!--
299
+ <servlet>
300
+ <servlet-name>ssi</servlet-name>
301
+ <servlet-class>
302
+ org.apache.catalina.ssi.SSIServlet
303
+ </servlet-class>
304
+ <init-param>
305
+ <param-name>buffered</param-name>
306
+ <param-value>1</param-value>
307
+ </init-param>
308
+ <init-param>
309
+ <param-name>debug</param-name>
310
+ <param-value>0</param-value>
311
+ </init-param>
312
+ <init-param>
313
+ <param-name>expires</param-name>
314
+ <param-value>666</param-value>
315
+ </init-param>
316
+ <init-param>
317
+ <param-name>isVirtualWebappRelative</param-name>
318
+ <param-value>0</param-value>
319
+ </init-param>
320
+ <load-on-startup>4</load-on-startup>
321
+ </servlet>
322
+ -->
323
+
324
+
325
+ <!-- Common Gateway Includes (CGI) processing servlet, which supports -->
326
+ <!-- execution of external applications that conform to the CGI spec -->
327
+ <!-- requirements. Typically, this servlet is mapped to the URL pattern -->
328
+ <!-- "/cgi-bin/*", which means that any CGI applications that are -->
329
+ <!-- executed must be present within the web application. This servlet -->
330
+ <!-- supports the following initialization parameters (default values -->
331
+ <!-- are in square brackets): -->
332
+ <!-- -->
333
+ <!-- cgiPathPrefix The CGI search path will start at -->
334
+ <!-- webAppRootDir + File.separator + this prefix. -->
335
+ <!-- [WEB-INF/cgi] -->
336
+ <!-- -->
337
+ <!-- debug Debugging detail level for messages logged -->
338
+ <!-- by this servlet. [0] -->
339
+ <!-- -->
340
+ <!-- executable Name of the executable used to run the -->
341
+ <!-- script. [perl] -->
342
+ <!-- -->
343
+ <!-- parameterEncoding Name of parameter encoding to be used with -->
344
+ <!-- CGI servlet. -->
345
+ <!-- [System.getProperty("file.encoding","UTF-8")] -->
346
+ <!-- -->
347
+ <!-- passShellEnvironment Should the shell environment variables (if -->
348
+ <!-- any) be passed to the CGI script? [false] -->
349
+ <!-- -->
350
+ <!-- stderrTimeout The time (in milliseconds) to wait for the -->
351
+ <!-- reading of stderr to complete before -->
352
+ <!-- terminating the CGI process. [2000] -->
353
+
354
+ <!--
355
+ <servlet>
356
+ <servlet-name>cgi</servlet-name>
357
+ <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
358
+ <init-param>
359
+ <param-name>debug</param-name>
360
+ <param-value>0</param-value>
361
+ </init-param>
362
+ <init-param>
363
+ <param-name>cgiPathPrefix</param-name>
364
+ <param-value>WEB-INF/cgi</param-value>
365
+ </init-param>
366
+ <load-on-startup>5</load-on-startup>
367
+ </servlet>
368
+ -->
369
+
370
+
371
+ <!-- ================ Built In Servlet Mappings ========================= -->
372
+
373
+
374
+ <!-- The servlet mappings for the built in servlets defined above. Note -->
375
+ <!-- that, by default, the CGI and SSI servlets are *not* mapped. You -->
376
+ <!-- must uncomment these mappings (or add them to your application's own -->
377
+ <!-- web.xml deployment descriptor) to enable these services -->
378
+
379
+ <!-- The mapping for the default servlet -->
380
+ <servlet-mapping>
381
+ <servlet-name>default</servlet-name>
382
+ <url-pattern>/</url-pattern>
383
+ </servlet-mapping>
384
+
385
+ <!-- The mapping for the deprecated invoker servlet -->
386
+ <!--
387
+ <servlet-mapping>
388
+ <servlet-name>invoker</servlet-name>
389
+ <url-pattern>/servlet/*</url-pattern>
390
+ </servlet-mapping>
391
+ -->
392
+
393
+ <!-- The mapping for the JSP servlet -->
394
+ <servlet-mapping>
395
+ <servlet-name>jsp</servlet-name>
396
+ <url-pattern>*.jsp</url-pattern>
397
+ </servlet-mapping>
398
+
399
+ <servlet-mapping>
400
+ <servlet-name>jsp</servlet-name>
401
+ <url-pattern>*.jspx</url-pattern>
402
+ </servlet-mapping>
403
+
404
+ <!-- The mapping for the SSI servlet -->
405
+ <!--
406
+ <servlet-mapping>
407
+ <servlet-name>ssi</servlet-name>
408
+ <url-pattern>*.shtml</url-pattern>
409
+ </servlet-mapping>
410
+ -->
411
+
412
+ <!-- The mapping for the CGI Gateway servlet -->
413
+
414
+ <!--
415
+ <servlet-mapping>
416
+ <servlet-name>cgi</servlet-name>
417
+ <url-pattern>/cgi-bin/*</url-pattern>
418
+ </servlet-mapping>
419
+ -->
420
+
421
+
422
+ <!-- ================== Built In Filter Definitions ===================== -->
423
+
424
+ <!-- NOTE: An SSI Servlet is also available as an alternative SSI -->
425
+ <!-- implementation. Use either the Servlet or the Filter but NOT both. -->
426
+ <!-- -->
427
+ <!-- Server Side Includes processing filter, which processes SSI -->
428
+ <!-- directives in HTML pages consistent with similar support in web -->
429
+ <!-- servers like Apache. Traditionally, this filter is mapped to the -->
430
+ <!-- URL pattern "*.shtml", though it can be mapped to "*" as it will -->
431
+ <!-- selectively enable/disable SSI processing based on mime types. For -->
432
+ <!-- this to work you will need to uncomment the .shtml mime type -->
433
+ <!-- definition towards the bottom of this file. -->
434
+ <!-- The contentType init param allows you to apply SSI processing to JSP -->
435
+ <!-- pages, javascript, or any other content you wish. This filter -->
436
+ <!-- supports the following initialization parameters (default values are -->
437
+ <!-- in square brackets): -->
438
+ <!-- -->
439
+ <!-- contentType A regex pattern that must be matched before -->
440
+ <!-- SSI processing is applied. -->
441
+ <!-- [text/x-server-parsed-html(;.*)?] -->
442
+ <!-- -->
443
+ <!-- debug Debugging detail level for messages logged -->
444
+ <!-- by this servlet. [0] -->
445
+ <!-- -->
446
+ <!-- expires The number of seconds before a page with SSI -->
447
+ <!-- directives will expire. [No default] -->
448
+ <!-- -->
449
+ <!-- isVirtualWebappRelative -->
450
+ <!-- Should "virtual" paths be interpreted as -->
451
+ <!-- relative to the context root, instead of -->
452
+ <!-- the server root? (0=false, 1=true) [0] -->
453
+ <!-- -->
454
+ <!-- allowExec Is use of the exec command enabled? [false] -->
455
+
456
+ <!--
457
+ <filter>
458
+ <filter-name>ssi</filter-name>
459
+ <filter-class>
460
+ org.apache.catalina.ssi.SSIFilter
461
+ </filter-class>
462
+ <init-param>
463
+ <param-name>contentType</param-name>
464
+ <param-value>text/x-server-parsed-html(;.*)?</param-value>
465
+ </init-param>
466
+ <init-param>
467
+ <param-name>debug</param-name>
468
+ <param-value>0</param-value>
469
+ </init-param>
470
+ <init-param>
471
+ <param-name>expires</param-name>
472
+ <param-value>666</param-value>
473
+ </init-param>
474
+ <init-param>
475
+ <param-name>isVirtualWebappRelative</param-name>
476
+ <param-value>0</param-value>
477
+ </init-param>
478
+ </filter>
479
+ -->
480
+
481
+
482
+ <!-- ==================== Built In Filter Mappings ====================== -->
483
+
484
+ <!-- The mapping for the SSI Filter -->
485
+ <!--
486
+ <filter-mapping>
487
+ <filter-name>ssi</filter-name>
488
+ <url-pattern>*.shtml</url-pattern>
489
+ </filter-mapping>
490
+ -->
491
+
492
+
493
+ <!-- ==================== Default Session Configuration ================= -->
494
+ <!-- You can set the default session timeout (in minutes) for all newly -->
495
+ <!-- created sessions by modifying the value below. -->
496
+
497
+ <session-config>
498
+ <session-timeout>30</session-timeout>
499
+ </session-config>
500
+
501
+
502
+ <!-- ===================== Default MIME Type Mappings =================== -->
503
+ <!-- When serving static resources, Tomcat will automatically generate -->
504
+ <!-- a "Content-Type" header based on the resource's filename extension, -->
505
+ <!-- based on these mappings. Additional mappings can be added here (to -->
506
+ <!-- apply to all web applications), or in your own application's web.xml -->
507
+ <!-- deployment descriptor. -->
508
+
509
+ <mime-mapping>
510
+ <extension>abs</extension>
511
+ <mime-type>audio/x-mpeg</mime-type>
512
+ </mime-mapping>
513
+ <mime-mapping>
514
+ <extension>ai</extension>
515
+ <mime-type>application/postscript</mime-type>
516
+ </mime-mapping>
517
+ <mime-mapping>
518
+ <extension>aif</extension>
519
+ <mime-type>audio/x-aiff</mime-type>
520
+ </mime-mapping>
521
+ <mime-mapping>
522
+ <extension>aifc</extension>
523
+ <mime-type>audio/x-aiff</mime-type>
524
+ </mime-mapping>
525
+ <mime-mapping>
526
+ <extension>aiff</extension>
527
+ <mime-type>audio/x-aiff</mime-type>
528
+ </mime-mapping>
529
+ <mime-mapping>
530
+ <extension>aim</extension>
531
+ <mime-type>application/x-aim</mime-type>
532
+ </mime-mapping>
533
+ <mime-mapping>
534
+ <extension>art</extension>
535
+ <mime-type>image/x-jg</mime-type>
536
+ </mime-mapping>
537
+ <mime-mapping>
538
+ <extension>asf</extension>
539
+ <mime-type>video/x-ms-asf</mime-type>
540
+ </mime-mapping>
541
+ <mime-mapping>
542
+ <extension>asx</extension>
543
+ <mime-type>video/x-ms-asf</mime-type>
544
+ </mime-mapping>
545
+ <mime-mapping>
546
+ <extension>au</extension>
547
+ <mime-type>audio/basic</mime-type>
548
+ </mime-mapping>
549
+ <mime-mapping>
550
+ <extension>avi</extension>
551
+ <mime-type>video/x-msvideo</mime-type>
552
+ </mime-mapping>
553
+ <mime-mapping>
554
+ <extension>avx</extension>
555
+ <mime-type>video/x-rad-screenplay</mime-type>
556
+ </mime-mapping>
557
+ <mime-mapping>
558
+ <extension>bcpio</extension>
559
+ <mime-type>application/x-bcpio</mime-type>
560
+ </mime-mapping>
561
+ <mime-mapping>
562
+ <extension>bin</extension>
563
+ <mime-type>application/octet-stream</mime-type>
564
+ </mime-mapping>
565
+ <mime-mapping>
566
+ <extension>bmp</extension>
567
+ <mime-type>image/bmp</mime-type>
568
+ </mime-mapping>
569
+ <mime-mapping>
570
+ <extension>body</extension>
571
+ <mime-type>text/html</mime-type>
572
+ </mime-mapping>
573
+ <mime-mapping>
574
+ <extension>cdf</extension>
575
+ <mime-type>application/x-cdf</mime-type>
576
+ </mime-mapping>
577
+ <mime-mapping>
578
+ <extension>cer</extension>
579
+ <mime-type>application/x-x509-ca-cert</mime-type>
580
+ </mime-mapping>
581
+ <mime-mapping>
582
+ <extension>class</extension>
583
+ <mime-type>application/java</mime-type>
584
+ </mime-mapping>
585
+ <mime-mapping>
586
+ <extension>cpio</extension>
587
+ <mime-type>application/x-cpio</mime-type>
588
+ </mime-mapping>
589
+ <mime-mapping>
590
+ <extension>csh</extension>
591
+ <mime-type>application/x-csh</mime-type>
592
+ </mime-mapping>
593
+ <mime-mapping>
594
+ <extension>css</extension>
595
+ <mime-type>text/css</mime-type>
596
+ </mime-mapping>
597
+ <mime-mapping>
598
+ <extension>dib</extension>
599
+ <mime-type>image/bmp</mime-type>
600
+ </mime-mapping>
601
+ <mime-mapping>
602
+ <extension>doc</extension>
603
+ <mime-type>application/msword</mime-type>
604
+ </mime-mapping>
605
+ <mime-mapping>
606
+ <extension>dtd</extension>
607
+ <mime-type>application/xml-dtd</mime-type>
608
+ </mime-mapping>
609
+ <mime-mapping>
610
+ <extension>dv</extension>
611
+ <mime-type>video/x-dv</mime-type>
612
+ </mime-mapping>
613
+ <mime-mapping>
614
+ <extension>dvi</extension>
615
+ <mime-type>application/x-dvi</mime-type>
616
+ </mime-mapping>
617
+ <mime-mapping>
618
+ <extension>eps</extension>
619
+ <mime-type>application/postscript</mime-type>
620
+ </mime-mapping>
621
+ <mime-mapping>
622
+ <extension>etx</extension>
623
+ <mime-type>text/x-setext</mime-type>
624
+ </mime-mapping>
625
+ <mime-mapping>
626
+ <extension>exe</extension>
627
+ <mime-type>application/octet-stream</mime-type>
628
+ </mime-mapping>
629
+ <mime-mapping>
630
+ <extension>gif</extension>
631
+ <mime-type>image/gif</mime-type>
632
+ </mime-mapping>
633
+ <mime-mapping>
634
+ <extension>gtar</extension>
635
+ <mime-type>application/x-gtar</mime-type>
636
+ </mime-mapping>
637
+ <mime-mapping>
638
+ <extension>gz</extension>
639
+ <mime-type>application/x-gzip</mime-type>
640
+ </mime-mapping>
641
+ <mime-mapping>
642
+ <extension>hdf</extension>
643
+ <mime-type>application/x-hdf</mime-type>
644
+ </mime-mapping>
645
+ <mime-mapping>
646
+ <extension>hqx</extension>
647
+ <mime-type>application/mac-binhex40</mime-type>
648
+ </mime-mapping>
649
+ <mime-mapping>
650
+ <extension>htc</extension>
651
+ <mime-type>text/x-component</mime-type>
652
+ </mime-mapping>
653
+ <mime-mapping>
654
+ <extension>htm</extension>
655
+ <mime-type>text/html</mime-type>
656
+ </mime-mapping>
657
+ <mime-mapping>
658
+ <extension>html</extension>
659
+ <mime-type>text/html</mime-type>
660
+ </mime-mapping>
661
+ <mime-mapping>
662
+ <extension>hqx</extension>
663
+ <mime-type>application/mac-binhex40</mime-type>
664
+ </mime-mapping>
665
+ <mime-mapping>
666
+ <extension>ief</extension>
667
+ <mime-type>image/ief</mime-type>
668
+ </mime-mapping>
669
+ <mime-mapping>
670
+ <extension>jad</extension>
671
+ <mime-type>text/vnd.sun.j2me.app-descriptor</mime-type>
672
+ </mime-mapping>
673
+ <mime-mapping>
674
+ <extension>jar</extension>
675
+ <mime-type>application/java-archive</mime-type>
676
+ </mime-mapping>
677
+ <mime-mapping>
678
+ <extension>java</extension>
679
+ <mime-type>text/plain</mime-type>
680
+ </mime-mapping>
681
+ <mime-mapping>
682
+ <extension>jnlp</extension>
683
+ <mime-type>application/x-java-jnlp-file</mime-type>
684
+ </mime-mapping>
685
+ <mime-mapping>
686
+ <extension>jpe</extension>
687
+ <mime-type>image/jpeg</mime-type>
688
+ </mime-mapping>
689
+ <mime-mapping>
690
+ <extension>jpeg</extension>
691
+ <mime-type>image/jpeg</mime-type>
692
+ </mime-mapping>
693
+ <mime-mapping>
694
+ <extension>jpg</extension>
695
+ <mime-type>image/jpeg</mime-type>
696
+ </mime-mapping>
697
+ <mime-mapping>
698
+ <extension>js</extension>
699
+ <mime-type>text/javascript</mime-type>
700
+ </mime-mapping>
701
+ <mime-mapping>
702
+ <extension>jsf</extension>
703
+ <mime-type>text/plain</mime-type>
704
+ </mime-mapping>
705
+ <mime-mapping>
706
+ <extension>jspf</extension>
707
+ <mime-type>text/plain</mime-type>
708
+ </mime-mapping>
709
+ <mime-mapping>
710
+ <extension>kar</extension>
711
+ <mime-type>audio/x-midi</mime-type>
712
+ </mime-mapping>
713
+ <mime-mapping>
714
+ <extension>latex</extension>
715
+ <mime-type>application/x-latex</mime-type>
716
+ </mime-mapping>
717
+ <mime-mapping>
718
+ <extension>m3u</extension>
719
+ <mime-type>audio/x-mpegurl</mime-type>
720
+ </mime-mapping>
721
+ <mime-mapping>
722
+ <extension>mac</extension>
723
+ <mime-type>image/x-macpaint</mime-type>
724
+ </mime-mapping>
725
+ <mime-mapping>
726
+ <extension>man</extension>
727
+ <mime-type>application/x-troff-man</mime-type>
728
+ </mime-mapping>
729
+ <mime-mapping>
730
+ <extension>mathml</extension>
731
+ <mime-type>application/mathml+xml</mime-type>
732
+ </mime-mapping>
733
+ <mime-mapping>
734
+ <extension>me</extension>
735
+ <mime-type>application/x-troff-me</mime-type>
736
+ </mime-mapping>
737
+ <mime-mapping>
738
+ <extension>mid</extension>
739
+ <mime-type>audio/x-midi</mime-type>
740
+ </mime-mapping>
741
+ <mime-mapping>
742
+ <extension>midi</extension>
743
+ <mime-type>audio/x-midi</mime-type>
744
+ </mime-mapping>
745
+ <mime-mapping>
746
+ <extension>mif</extension>
747
+ <mime-type>application/x-mif</mime-type>
748
+ </mime-mapping>
749
+ <mime-mapping>
750
+ <extension>mov</extension>
751
+ <mime-type>video/quicktime</mime-type>
752
+ </mime-mapping>
753
+ <mime-mapping>
754
+ <extension>movie</extension>
755
+ <mime-type>video/x-sgi-movie</mime-type>
756
+ </mime-mapping>
757
+ <mime-mapping>
758
+ <extension>mp1</extension>
759
+ <mime-type>audio/x-mpeg</mime-type>
760
+ </mime-mapping>
761
+ <mime-mapping>
762
+ <extension>mp2</extension>
763
+ <mime-type>audio/x-mpeg</mime-type>
764
+ </mime-mapping>
765
+ <mime-mapping>
766
+ <extension>mp3</extension>
767
+ <mime-type>audio/x-mpeg</mime-type>
768
+ </mime-mapping>
769
+ <mime-mapping>
770
+ <extension>mp4</extension>
771
+ <mime-type>video/mp4</mime-type>
772
+ </mime-mapping>
773
+ <mime-mapping>
774
+ <extension>mpa</extension>
775
+ <mime-type>audio/x-mpeg</mime-type>
776
+ </mime-mapping>
777
+ <mime-mapping>
778
+ <extension>mpe</extension>
779
+ <mime-type>video/mpeg</mime-type>
780
+ </mime-mapping>
781
+ <mime-mapping>
782
+ <extension>mpeg</extension>
783
+ <mime-type>video/mpeg</mime-type>
784
+ </mime-mapping>
785
+ <mime-mapping>
786
+ <extension>mpega</extension>
787
+ <mime-type>audio/x-mpeg</mime-type>
788
+ </mime-mapping>
789
+ <mime-mapping>
790
+ <extension>mpg</extension>
791
+ <mime-type>video/mpeg</mime-type>
792
+ </mime-mapping>
793
+ <mime-mapping>
794
+ <extension>mpv2</extension>
795
+ <mime-type>video/mpeg2</mime-type>
796
+ </mime-mapping>
797
+ <mime-mapping>
798
+ <extension>ms</extension>
799
+ <mime-type>application/x-wais-source</mime-type>
800
+ </mime-mapping>
801
+ <mime-mapping>
802
+ <extension>nc</extension>
803
+ <mime-type>application/x-netcdf</mime-type>
804
+ </mime-mapping>
805
+ <mime-mapping>
806
+ <extension>oda</extension>
807
+ <mime-type>application/oda</mime-type>
808
+ </mime-mapping>
809
+ <mime-mapping>
810
+ <!-- OpenDocument Database -->
811
+ <extension>odb</extension>
812
+ <mime-type>application/vnd.oasis.opendocument.database</mime-type>
813
+ </mime-mapping>
814
+ <mime-mapping>
815
+ <!-- OpenDocument Chart -->
816
+ <extension>odc</extension>
817
+ <mime-type>application/vnd.oasis.opendocument.chart</mime-type>
818
+ </mime-mapping>
819
+ <mime-mapping>
820
+ <!-- OpenDocument Formula -->
821
+ <extension>odf</extension>
822
+ <mime-type>application/vnd.oasis.opendocument.formula</mime-type>
823
+ </mime-mapping>
824
+ <mime-mapping>
825
+ <!-- OpenDocument Drawing -->
826
+ <extension>odg</extension>
827
+ <mime-type>application/vnd.oasis.opendocument.graphics</mime-type>
828
+ </mime-mapping>
829
+ <mime-mapping>
830
+ <!-- OpenDocument Image -->
831
+ <extension>odi</extension>
832
+ <mime-type>application/vnd.oasis.opendocument.image</mime-type>
833
+ </mime-mapping>
834
+ <mime-mapping>
835
+ <!-- OpenDocument Master Document -->
836
+ <extension>odm</extension>
837
+ <mime-type>application/vnd.oasis.opendocument.text-master</mime-type>
838
+ </mime-mapping>
839
+ <mime-mapping>
840
+ <!-- OpenDocument Presentation -->
841
+ <extension>odp</extension>
842
+ <mime-type>application/vnd.oasis.opendocument.presentation</mime-type>
843
+ </mime-mapping>
844
+ <mime-mapping>
845
+ <!-- OpenDocument Spreadsheet -->
846
+ <extension>ods</extension>
847
+ <mime-type>application/vnd.oasis.opendocument.spreadsheet</mime-type>
848
+ </mime-mapping>
849
+ <mime-mapping>
850
+ <!-- OpenDocument Text -->
851
+ <extension>odt</extension>
852
+ <mime-type>application/vnd.oasis.opendocument.text</mime-type>
853
+ </mime-mapping>
854
+ <mime-mapping>
855
+ <extension>ogg</extension>
856
+ <mime-type>application/ogg</mime-type>
857
+ </mime-mapping>
858
+ <mime-mapping>
859
+ <!-- OpenDocument Drawing Template -->
860
+ <extension>otg</extension>
861
+ <mime-type>application/vnd.oasis.opendocument.graphics-template</mime-type>
862
+ </mime-mapping>
863
+ <mime-mapping>
864
+ <!-- HTML Document Template -->
865
+ <extension>oth</extension>
866
+ <mime-type>application/vnd.oasis.opendocument.text-web</mime-type>
867
+ </mime-mapping>
868
+ <mime-mapping>
869
+ <!-- OpenDocument Presentation Template -->
870
+ <extension>otp</extension>
871
+ <mime-type>application/vnd.oasis.opendocument.presentation-template</mime-type>
872
+ </mime-mapping>
873
+ <mime-mapping>
874
+ <!-- OpenDocument Spreadsheet Template -->
875
+ <extension>ots</extension>
876
+ <mime-type>application/vnd.oasis.opendocument.spreadsheet-template</mime-type>
877
+ </mime-mapping>
878
+ <mime-mapping>
879
+ <!-- OpenDocument Text Template -->
880
+ <extension>ott</extension>
881
+ <mime-type>application/vnd.oasis.opendocument.text-template</mime-type>
882
+ </mime-mapping>
883
+ <mime-mapping>
884
+ <extension>pbm</extension>
885
+ <mime-type>image/x-portable-bitmap</mime-type>
886
+ </mime-mapping>
887
+ <mime-mapping>
888
+ <extension>pct</extension>
889
+ <mime-type>image/pict</mime-type>
890
+ </mime-mapping>
891
+ <mime-mapping>
892
+ <extension>pdf</extension>
893
+ <mime-type>application/pdf</mime-type>
894
+ </mime-mapping>
895
+ <mime-mapping>
896
+ <extension>pgm</extension>
897
+ <mime-type>image/x-portable-graymap</mime-type>
898
+ </mime-mapping>
899
+ <mime-mapping>
900
+ <extension>pic</extension>
901
+ <mime-type>image/pict</mime-type>
902
+ </mime-mapping>
903
+ <mime-mapping>
904
+ <extension>pict</extension>
905
+ <mime-type>image/pict</mime-type>
906
+ </mime-mapping>
907
+ <mime-mapping>
908
+ <extension>pls</extension>
909
+ <mime-type>audio/x-scpls</mime-type>
910
+ </mime-mapping>
911
+ <mime-mapping>
912
+ <extension>png</extension>
913
+ <mime-type>image/png</mime-type>
914
+ </mime-mapping>
915
+ <mime-mapping>
916
+ <extension>pnm</extension>
917
+ <mime-type>image/x-portable-anymap</mime-type>
918
+ </mime-mapping>
919
+ <mime-mapping>
920
+ <extension>pnt</extension>
921
+ <mime-type>image/x-macpaint</mime-type>
922
+ </mime-mapping>
923
+ <mime-mapping>
924
+ <extension>ppm</extension>
925
+ <mime-type>image/x-portable-pixmap</mime-type>
926
+ </mime-mapping>
927
+ <mime-mapping>
928
+ <extension>ppt</extension>
929
+ <mime-type>application/vnd.ms-powerpoint</mime-type>
930
+ </mime-mapping>
931
+ <mime-mapping>
932
+ <extension>pps</extension>
933
+ <mime-type>application/vnd.ms-powerpoint</mime-type>
934
+ </mime-mapping>
935
+ <mime-mapping>
936
+ <extension>ps</extension>
937
+ <mime-type>application/postscript</mime-type>
938
+ </mime-mapping>
939
+ <mime-mapping>
940
+ <extension>psd</extension>
941
+ <mime-type>image/x-photoshop</mime-type>
942
+ </mime-mapping>
943
+ <mime-mapping>
944
+ <extension>qt</extension>
945
+ <mime-type>video/quicktime</mime-type>
946
+ </mime-mapping>
947
+ <mime-mapping>
948
+ <extension>qti</extension>
949
+ <mime-type>image/x-quicktime</mime-type>
950
+ </mime-mapping>
951
+ <mime-mapping>
952
+ <extension>qtif</extension>
953
+ <mime-type>image/x-quicktime</mime-type>
954
+ </mime-mapping>
955
+ <mime-mapping>
956
+ <extension>ras</extension>
957
+ <mime-type>image/x-cmu-raster</mime-type>
958
+ </mime-mapping>
959
+ <mime-mapping>
960
+ <extension>rdf</extension>
961
+ <mime-type>application/rdf+xml</mime-type>
962
+ </mime-mapping>
963
+ <mime-mapping>
964
+ <extension>rgb</extension>
965
+ <mime-type>image/x-rgb</mime-type>
966
+ </mime-mapping>
967
+ <mime-mapping>
968
+ <extension>rm</extension>
969
+ <mime-type>application/vnd.rn-realmedia</mime-type>
970
+ </mime-mapping>
971
+ <mime-mapping>
972
+ <extension>roff</extension>
973
+ <mime-type>application/x-troff</mime-type>
974
+ </mime-mapping>
975
+ <mime-mapping>
976
+ <extension>rtf</extension>
977
+ <mime-type>application/rtf</mime-type>
978
+ </mime-mapping>
979
+ <mime-mapping>
980
+ <extension>rtx</extension>
981
+ <mime-type>text/richtext</mime-type>
982
+ </mime-mapping>
983
+ <mime-mapping>
984
+ <extension>sh</extension>
985
+ <mime-type>application/x-sh</mime-type>
986
+ </mime-mapping>
987
+ <mime-mapping>
988
+ <extension>shar</extension>
989
+ <mime-type>application/x-shar</mime-type>
990
+ </mime-mapping>
991
+ <!--
992
+ <mime-mapping>
993
+ <extension>shtml</extension>
994
+ <mime-type>text/x-server-parsed-html</mime-type>
995
+ </mime-mapping>
996
+ -->
997
+ <mime-mapping>
998
+ <extension>smf</extension>
999
+ <mime-type>audio/x-midi</mime-type>
1000
+ </mime-mapping>
1001
+ <mime-mapping>
1002
+ <extension>sit</extension>
1003
+ <mime-type>application/x-stuffit</mime-type>
1004
+ </mime-mapping>
1005
+ <mime-mapping>
1006
+ <extension>snd</extension>
1007
+ <mime-type>audio/basic</mime-type>
1008
+ </mime-mapping>
1009
+ <mime-mapping>
1010
+ <extension>src</extension>
1011
+ <mime-type>application/x-wais-source</mime-type>
1012
+ </mime-mapping>
1013
+ <mime-mapping>
1014
+ <extension>sv4cpio</extension>
1015
+ <mime-type>application/x-sv4cpio</mime-type>
1016
+ </mime-mapping>
1017
+ <mime-mapping>
1018
+ <extension>sv4crc</extension>
1019
+ <mime-type>application/x-sv4crc</mime-type>
1020
+ </mime-mapping>
1021
+ <mime-mapping>
1022
+ <extension>svg</extension>
1023
+ <mime-type>image/svg+xml</mime-type>
1024
+ </mime-mapping>
1025
+ <mime-mapping>
1026
+ <extension>svgz</extension>
1027
+ <mime-type>image/svg+xml</mime-type>
1028
+ </mime-mapping>
1029
+ <mime-mapping>
1030
+ <extension>swf</extension>
1031
+ <mime-type>application/x-shockwave-flash</mime-type>
1032
+ </mime-mapping>
1033
+ <mime-mapping>
1034
+ <extension>t</extension>
1035
+ <mime-type>application/x-troff</mime-type>
1036
+ </mime-mapping>
1037
+ <mime-mapping>
1038
+ <extension>tar</extension>
1039
+ <mime-type>application/x-tar</mime-type>
1040
+ </mime-mapping>
1041
+ <mime-mapping>
1042
+ <extension>tcl</extension>
1043
+ <mime-type>application/x-tcl</mime-type>
1044
+ </mime-mapping>
1045
+ <mime-mapping>
1046
+ <extension>tex</extension>
1047
+ <mime-type>application/x-tex</mime-type>
1048
+ </mime-mapping>
1049
+ <mime-mapping>
1050
+ <extension>texi</extension>
1051
+ <mime-type>application/x-texinfo</mime-type>
1052
+ </mime-mapping>
1053
+ <mime-mapping>
1054
+ <extension>texinfo</extension>
1055
+ <mime-type>application/x-texinfo</mime-type>
1056
+ </mime-mapping>
1057
+ <mime-mapping>
1058
+ <extension>tif</extension>
1059
+ <mime-type>image/tiff</mime-type>
1060
+ </mime-mapping>
1061
+ <mime-mapping>
1062
+ <extension>tiff</extension>
1063
+ <mime-type>image/tiff</mime-type>
1064
+ </mime-mapping>
1065
+ <mime-mapping>
1066
+ <extension>tr</extension>
1067
+ <mime-type>application/x-troff</mime-type>
1068
+ </mime-mapping>
1069
+ <mime-mapping>
1070
+ <extension>tsv</extension>
1071
+ <mime-type>text/tab-separated-values</mime-type>
1072
+ </mime-mapping>
1073
+ <mime-mapping>
1074
+ <extension>txt</extension>
1075
+ <mime-type>text/plain</mime-type>
1076
+ </mime-mapping>
1077
+ <mime-mapping>
1078
+ <extension>ulw</extension>
1079
+ <mime-type>audio/basic</mime-type>
1080
+ </mime-mapping>
1081
+ <mime-mapping>
1082
+ <extension>ustar</extension>
1083
+ <mime-type>application/x-ustar</mime-type>
1084
+ </mime-mapping>
1085
+ <mime-mapping>
1086
+ <extension>vxml</extension>
1087
+ <mime-type>application/voicexml+xml</mime-type>
1088
+ </mime-mapping>
1089
+ <mime-mapping>
1090
+ <extension>xbm</extension>
1091
+ <mime-type>image/x-xbitmap</mime-type>
1092
+ </mime-mapping>
1093
+ <mime-mapping>
1094
+ <extension>xht</extension>
1095
+ <mime-type>application/xhtml+xml</mime-type>
1096
+ </mime-mapping>
1097
+ <mime-mapping>
1098
+ <extension>xhtml</extension>
1099
+ <mime-type>application/xhtml+xml</mime-type>
1100
+ </mime-mapping>
1101
+ <mime-mapping>
1102
+ <extension>xls</extension>
1103
+ <mime-type>application/vnd.ms-excel</mime-type>
1104
+ </mime-mapping>
1105
+ <mime-mapping>
1106
+ <extension>xml</extension>
1107
+ <mime-type>application/xml</mime-type>
1108
+ </mime-mapping>
1109
+ <mime-mapping>
1110
+ <extension>xpm</extension>
1111
+ <mime-type>image/x-xpixmap</mime-type>
1112
+ </mime-mapping>
1113
+ <mime-mapping>
1114
+ <extension>xsl</extension>
1115
+ <mime-type>application/xml</mime-type>
1116
+ </mime-mapping>
1117
+ <mime-mapping>
1118
+ <extension>xslt</extension>
1119
+ <mime-type>application/xslt+xml</mime-type>
1120
+ </mime-mapping>
1121
+ <mime-mapping>
1122
+ <extension>xul</extension>
1123
+ <mime-type>application/vnd.mozilla.xul+xml</mime-type>
1124
+ </mime-mapping>
1125
+ <mime-mapping>
1126
+ <extension>xwd</extension>
1127
+ <mime-type>image/x-xwindowdump</mime-type>
1128
+ </mime-mapping>
1129
+ <mime-mapping>
1130
+ <extension>vsd</extension>
1131
+ <mime-type>application/x-visio</mime-type>
1132
+ </mime-mapping>
1133
+ <mime-mapping>
1134
+ <extension>wav</extension>
1135
+ <mime-type>audio/x-wav</mime-type>
1136
+ </mime-mapping>
1137
+ <mime-mapping>
1138
+ <!-- Wireless Bitmap -->
1139
+ <extension>wbmp</extension>
1140
+ <mime-type>image/vnd.wap.wbmp</mime-type>
1141
+ </mime-mapping>
1142
+ <mime-mapping>
1143
+ <!-- WML Source -->
1144
+ <extension>wml</extension>
1145
+ <mime-type>text/vnd.wap.wml</mime-type>
1146
+ </mime-mapping>
1147
+ <mime-mapping>
1148
+ <!-- Compiled WML -->
1149
+ <extension>wmlc</extension>
1150
+ <mime-type>application/vnd.wap.wmlc</mime-type>
1151
+ </mime-mapping>
1152
+ <mime-mapping>
1153
+ <!-- WML Script Source -->
1154
+ <extension>wmls</extension>
1155
+ <mime-type>text/vnd.wap.wmlscript</mime-type>
1156
+ </mime-mapping>
1157
+ <mime-mapping>
1158
+ <!-- Compiled WML Script -->
1159
+ <extension>wmlscriptc</extension>
1160
+ <mime-type>application/vnd.wap.wmlscriptc</mime-type>
1161
+ </mime-mapping>
1162
+ <mime-mapping>
1163
+ <extension>wmv</extension>
1164
+ <mime-type>video/x-ms-wmv</mime-type>
1165
+ </mime-mapping>
1166
+ <mime-mapping>
1167
+ <extension>wrl</extension>
1168
+ <mime-type>x-world/x-vrml</mime-type>
1169
+ </mime-mapping>
1170
+ <mime-mapping>
1171
+ <extension>wspolicy</extension>
1172
+ <mime-type>application/wspolicy+xml</mime-type>
1173
+ </mime-mapping>
1174
+ <mime-mapping>
1175
+ <extension>Z</extension>
1176
+ <mime-type>application/x-compress</mime-type>
1177
+ </mime-mapping>
1178
+ <mime-mapping>
1179
+ <extension>z</extension>
1180
+ <mime-type>application/x-compress</mime-type>
1181
+ </mime-mapping>
1182
+ <mime-mapping>
1183
+ <extension>zip</extension>
1184
+ <mime-type>application/zip</mime-type>
1185
+ </mime-mapping>
1186
+
1187
+ <!-- ==================== Default Welcome File List ===================== -->
1188
+ <!-- When a request URI refers to a directory, the default servlet looks -->
1189
+ <!-- for a "welcome file" within that directory and, if present, -->
1190
+ <!-- to the corresponding resource URI for display. If no welcome file -->
1191
+ <!-- is present, the default servlet either serves a directory listing, -->
1192
+ <!-- or returns a 404 status, depending on how it is configured. -->
1193
+ <!-- -->
1194
+ <!-- If you define welcome files in your own application's web.xml -->
1195
+ <!-- deployment descriptor, that list *replaces* the list configured -->
1196
+ <!-- here, so be sure that you include any of the default values that -->
1197
+ <!-- you wish to include. -->
1198
+
1199
+ <welcome-file-list>
1200
+ <welcome-file>index.html</welcome-file>
1201
+ <welcome-file>index.htm</welcome-file>
1202
+ <welcome-file>index.jsp</welcome-file>
1203
+ </welcome-file-list>
1204
+
1205
+ </web-app>