~ubuntu-branches/ubuntu/maverick/tomcat6/maverick

« back to all changes in this revision

Viewing changes to webapps/docs/config/host.xml

  • Committer: Bazaar Package Importer
  • Author(s): Thierry Carrez
  • Date: 2010-07-20 14:36:48 UTC
  • mfrom: (2.2.17 sid)
  • Revision ID: james.westby@ubuntu.com-20100720143648-23y81x6cq1kv1z00
Tags: 6.0.28-2
* Add debconf questions for user, group and Java options.
* Use ucf to install /etc/default/tomcat6 from a template
* Drop CATALINA_BASE and CATALINA_HOME from /etc/default/tomcat6 since we
  shouldn't encourage users to change those anyway

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
    <blockquote><em>
62
62
    <p>The description below uses the variable name $CATALINA_BASE to refer the
63
63
    base directory against which most relative paths are resolved. If you have
64
 
    not configured Tomcat 6 for multiple instances by setting a CATALINA_BASE
 
64
    not configured Tomcat for multiple instances by setting a CATALINA_BASE
65
65
    directory, then $CATALINA_BASE will be set to the value of $CATALINA_HOME,
66
 
    the directory into which you have installed Tomcat 6.</p>
 
66
    the directory into which you have installed Tomcat.</p>
67
67
    </em></blockquote>
68
68
 
69
69
</section>
82
82
        <p>The <em>Application Base</em> directory for this virtual host.
83
83
        This is the pathname of a directory that may contain web applications
84
84
        to be deployed on this virtual host.  You may specify an
85
 
        absolute pathname for this directory, or a pathname that is relative
86
 
        to the <code>$CATALINA_BASE</code> directory.  See
 
85
        absolute pathname, or a pathname that is relative to the
 
86
        <code>$CATALINA_BASE</code> directory.  See
87
87
        <a href="#Automatic Application Deployment">Automatic Application
88
88
        Deployment</a> for more information on automatic recognition and
89
 
        deployment of web applications to be deployed automatically. If not
90
 
        specified, the default of <code>webapps</code> will be used.</p>
 
89
        deployment of web applications. If not specified, the default of
 
90
        <code>webapps</code> will be used.</p>
91
91
      </attribute>
92
92
 
93
93
      <attribute name="autoDeploy" required="false">
94
 
        <p>This flag value indicates if new web applications, dropped in to
95
 
        the <code>appBase</code> directory while Tomcat is running, should
96
 
        be automatically deployed.  The flag's value defaults to true.  See
 
94
        <p>This flag value indicates if Tomcat should check periodically for new
 
95
        or updated web applications while Tomcat is running. If true, Tomcat
 
96
        periodically checks the <code>appBase</code> and
 
97
        <code>$CATALINA_BASE/conf/[engine_name]/[host_name]</code>
 
98
        directories and deploys any new web applications or context XML
 
99
        descriptors found. Updated web applications or context XML descriptors
 
100
        will trigger a reload of the web application. The flag's value defaults
 
101
        to true.  See
97
102
        <a href="#Automatic Application Deployment">Automatic Application
98
103
        Deployment</a> for more information.</p>
99
104
      </attribute>
122
127
 
123
128
      <attribute name="deployOnStartup" required="false">
124
129
        <p>This flag value indicates if web applications from this host should
125
 
        be automatically deployed by the host configurator.
126
 
        The flag's value defaults to true.  See
 
130
        be automatically deployed when Tomcat starts. The flag's value defaults
 
131
        to true.  See
127
132
        <a href="#Automatic Application Deployment">Automatic Application
128
133
        Deployment</a> for more information.</p>
129
134
      </attribute>
154
159
    <attributes>
155
160
 
156
161
      <attribute name="deployXML" required="false">
157
 
        <p>Set to <code>false</code> if you want to disable parsing the context.xml
158
 
        file embedded inside the application (located at <code>/META-INF/context.xml</code>). 
159
 
        Security conscious environments should set this to <code>false</code> to prevent
160
 
        applications from interacting with the container's configuration. The 
161
 
        administrator will then be responsible for providing an external context 
162
 
        configuration file, and put it in 
163
 
        <code>$CATALINA_BASE/conf/[enginename]/[hostname]/</code>.
164
 
        The flag's value defaults to <code>true</code>.</p>
 
162
        <p>Set to <code>false</code> if you want to disable parsing the context
 
163
        XML descriptor embedded inside the application (located at
 
164
        <code>/META-INF/context.xml</code>). Security conscious environments
 
165
        should set this to <code>false</code> to prevent applications from
 
166
        interacting with the container's configuration. The  administrator will
 
167
        then be responsible for providing an external context configuration
 
168
        file, and putting it in
 
169
        <code>$CATALINA_BASE/conf/[engine_name]/[host_name]</code>. The flag's
 
170
        value defaults to <code>true</code>.</p>
165
171
      </attribute>
166
172
 
167
173
      <attribute name="errorReportValveClass" required="false">
180
186
        placed in the <code>appBase</code> directory as web application
181
187
        archive (WAR) files to be unpacked into a corresponding disk directory
182
188
        structure, <code>false</code> to run such web applications directly
183
 
        from a WAR file.  See
 
189
        from a WAR file. WAR files located outside of the Host's
 
190
        <strong>appBase</strong> will not be expanded. See
184
191
        <a href="#Automatic Application Deployment">Automatic Application
185
192
        Deployment</a> for more information.</p>
186
193
      </attribute>
232
239
  <subsection name="Logging">
233
240
 
234
241
    <p>A host is associated with the 
235
 
       <code>org.apache.catalina.core.ContainerBase.[enginename].[hostname]</code>
 
242
       <code>org.apache.catalina.core.ContainerBase.[engine_name].[host_name]</code>
236
243
       log category.  Note that the brackets are part of the name,
237
244
       don't omit them.</p>
238
245
 
277
284
    started, if the <code>deployOnStartup</code> property is set to
278
285
    <code>true</code> (which is the default value):</p>
279
286
    <ul>
280
 
    <li>Any XML file in the 
281
 
        <code>$CATALINA_BASE/conf/[engine_name]/[host_name]</code> directory is
282
 
        assumed to contain a
 
287
    <li>Any XML file in
 
288
        <code>$CATALINA_BASE/conf/[engine_name]/[host_name]</code> is
 
289
        assumed to be a context XML descriptor containing a
283
290
        <a href="context.html">Context</a> element (and its associated
284
 
        subelements) for a single web application.  The <code>docBase</code>
285
 
        attribute of this <code>&lt;Context&gt;</code> element will typically
286
 
        be the absolute pathname to a web application directory, or the
287
 
        absolute pathname of a web application archive (WAR) file (which
288
 
        will not be expanded). The path attribute will be automatically set
289
 
        as defined in the <a href="context.html">Context</a> documentation.</li>
290
 
    <li>Any web application archive file within the application base (appBase)
291
 
        directory that does not have a corresponding
292
 
        directory of the same name (without the ".war" extension) will be
293
 
        automatically expanded, unless the <code>unpackWARs</code> property
294
 
        is set to <code>false</code>.  If you redeploy an updated WAR file,
295
 
        be sure to delete the expanded directory when restarting Tomcat, so
296
 
        that the updated WAR file will be re-expanded (note that the auto
297
 
        deployer, if enabled, will automatically expand the updated WAR file
298
 
        once the previously expanded directory is removed). Multi-level contexts
299
 
        may be defined by using #, e.g. use a WAR named <code>foo#bar.war</code>
300
 
        for a context path of <code>/foo/bar</code>.</li>
301
 
    <li>Any subdirectory within the <em>application base directory</em>
302
 
        will receive an automatically generated <a href="context.html">
303
 
        Context</a> element, even if this directory is not mentioned in the
304
 
        <code>conf/server.xml</code> file. The context path for this
305
 
        deployed Context will be a slash character ("/") followed by the
306
 
        directory name, unless the directory name is ROOT, in which case
307
 
        the context path will be an empty string (""). Multi-level contexts
308
 
        may be defined by using #, e.g. use a directory named <code>foo#bar</code>
309
 
        for a context path of <code>/foo/bar</code>.</li>
 
291
        sub-elements) for a single web application. The web applications
 
292
        associated with each of these context XML descriptor files will be
 
293
        deployed first.<br/>
 
294
        The <code>docBase</code> attribute of this <code>&lt;Context&gt;</code>
 
295
        element must only be set if the docBase is outside the Host's
 
296
        <code>appBase</code>. For web applications located inside the Host's
 
297
        <code>appBase</code>, the <code>docBase</code> will be the name of the
 
298
        XML file with ".xml" replaced with ".war" for a web application archive
 
299
        or the name of the XML file with ".xml" removed for a directory.<br/>
 
300
        The <code>path</code> attribute must not be set. The context path used
 
301
        will be a slash character ("/") followed by the name of the XML file
 
302
        (less the .xml extension). Multi-level context paths may be defined
 
303
        using #, e.g. <code>foo#bar.xml</code> for a context path of
 
304
        <code>/foo/bar</code>. The default web application that has a context
 
305
        path of <code>/</code> may be defined by using a file called
 
306
        <code>ROOT.xml</code>.</li>
 
307
    <li>Any web application archive file within the Host's <code>appBase</code>
 
308
        directory that has not already been deployed as a result of a context
 
309
        XML descriptor and does not have a corresponding directory of the same
 
310
        name (without the ".war" extension) will be deployed next. The context
 
311
        path used will be a slash character ("/") followed by the web
 
312
        application archive name less the ".war" extension. The one exception to
 
313
        this rule is that a web application archive named "ROOT.war" will be
 
314
        deployed with a context path of <code>/</code>. Multi-level contexts may
 
315
        be defined by using #, e.g. use a WAR named <code>foo#bar.war</code> for
 
316
        a context path of <code>/foo/bar</code>.<br/>
 
317
        If the <code>unpackWARs</code> attribute is <code>true</code>, the web
 
318
        application archive file will be expanded to a directory of the same
 
319
        name (without the ".war" extension".<br/>
 
320
        Note: If you re-deploy an updated WAR file while Tomcat is stopped, be
 
321
        sure to delete the associated expanded directory before restarting 
 
322
        Tomcat, so that the updated WAR file will be re-expanded when Tomcat
 
323
        restarts.<br/>
 
324
        Any web application archive file within the Hosts's <code>appBase</code>
 
325
        directory that does not have a corresponding context XML descriptor
 
326
        (with a ".xml" extension rather than a ".war" extension) in 
 
327
        <code>$CATALINA_BASE/conf/[engine_name]/[host_name]</code> will be
 
328
        scanned to see if it contains a context XML descriptor (located at
 
329
        <code>/META-INF/context.xml</code>) and if one is found the descriptor
 
330
        will be copied to the
 
331
        <code>$CATALINA_BASE/conf/[engine_name]/[host_name]</code> directory and
 
332
        renamed.
 
333
        </li>
 
334
    <li>Finally, any sub-directory within the Host's <code>appBase</code> that
 
335
        has not already been deployed as a result of a context XML descriptor
 
336
        will be deployed. The context path used will be a slash character
 
337
        ("/") followed by the directory name, unless the directory name is ROOT,
 
338
        in which case the context path will <code>/</code>. Multi-level contexts
 
339
        may be defined by using #, e.g. use a directory named
 
340
        <code>foo#bar</code> for a context path of <code>/foo/bar</code>.<br/>
 
341
        Any directory within the Hosts's <code>appBase</code> directory that
 
342
        does not have a corresponding context XML descriptor in
 
343
        <code>$CATALINA_BASE/conf/[engine_name]/[host_name]</code> will be
 
344
        scanned to see if it contains a context XML descriptor (located at
 
345
        <code>/META-INF/context.xml</code>) and if one is found the descriptor
 
346
        will be copied to
 
347
        <code>$CATALINA_BASE/conf/[engine_name]/[host_name]</code> and renamed.
 
348
        </li>
310
349
    </ul>
311
350
 
312
351
    <p>In addition to the automatic deployment that occurs at startup time,
313
352
    you can also request that new XML configuration files, WAR files, or
314
 
    subdirectories that are dropped in to the <code>appBase</code> (or 
 
353
    sub-directories that are dropped in to the <code>appBase</code> (or 
315
354
    <code>$CATALINA_BASE/conf/[engine_name]/[host_name]</code> in the case of
316
355
    an XML configuration file) directory while Tomcat is running will be
317
356
    automatically deployed, according to the rules described above. The 
355
394
    may be experienced deploying the web application or the application may
356
395
    be deployed twice.</p>
357
396
 
358
 
    <p>Finally, note that if you are defining contexts explicitly, you should
359
 
    probably turn off automatic application deployment.  Otherwise, your context
360
 
    will be deployed twice each, and that may cause problems for your app.
 
397
    <p>Finally, note that if you are defining contexts explicitly in server.xml,
 
398
    you should probably turn off automatic application deployment.  Otherwise,
 
399
    the web applications will each be deployed twice, and that may cause
 
400
    problems for the applications.
361
401
    </p>
362
402
 
363
403
  </subsection>