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

« back to all changes in this revision

Viewing changes to webapps/docs/html-manager-howto.xml

  • Committer: Bazaar Package Importer
  • Author(s): Thierry Carrez
  • Date: 2010-05-21 13:51:15 UTC
  • mfrom: (2.2.12 sid)
  • Revision ID: james.westby@ubuntu.com-20100521135115-qfwnf24lzvi3644v
Tags: 6.0.26-2
* debian/tomcat6.{postinst,prerm}: Respect TOMCAT6_USER and TOMCAT6_GROUP
  as defined in /etc/default/tomcat6 when setting directory permissions and
  authbind configuration (Closes: #581018, LP: #557300)
* debian/tomcat6.postinst: Use group "tomcat6" instead of "adm" for
  permissions in /var/lib/tomcat6, so that group "adm" doesn't get write
  permissions over /var/lib/tomcat6/webapps (LP: #569118)

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
<body>
31
31
 
 
32
<section name="Table of Contents">
 
33
<toc/>
 
34
</section>
 
35
 
32
36
<section name="Introduction">
33
37
 
34
38
<p>In many production environments it is very useful to have the capability
36
40
Tomcat.  This document is for the HTML web interface to the web application
37
41
<a href="manager-howto.html">manager</a>.</p>
38
42
 
39
 
<p>The interface is divided into five sections:
 
43
<p>The interface is divided into six sections:</p>
40
44
<ul>
41
45
  <li><strong>Message</strong> - Displays success and failure messages.</li>
42
46
  <li><strong>Manager</strong> - General manager operations like list and
44
48
  <li><strong>Applications</strong> - List of web applications and
45
49
      commands.</li>
46
50
  <li><strong>Deploy</strong> - Deploying web applications.</li>
 
51
  <li><strong>Diagnostics</strong> - Identifying potential problems.</li>
47
52
  <li><strong>Server Information</strong> - Information about the Tomcat
48
53
      server.</li>
49
54
</ul>
50
 
</p>
51
55
 
52
56
</section>
53
57
 
67
71
 
68
72
<section name="Manager">
69
73
 
70
 
<p>The Manager section has three links:
 
74
<p>The Manager section has three links:</p>
71
75
<ul>
72
76
  <li><strong>List Applications</strong> - Redisplay a list of web
73
77
      applications.</li>
75
79
  <li><strong>Manager Help</strong> - A link to the comprehensive Manager
76
80
      App HOW TO.</li>
77
81
</ul>
78
 
</p>
79
82
 
80
83
</section>
81
84
 
83
86
 
84
87
<p>The Applications section lists information about all the installed web
85
88
applications and provides links for managing them. For each web application
86
 
the following is displayed:
 
89
the following is displayed:</p>
87
90
<ul>
88
91
  <li><strong>Path</strong> - The web application context path.</li>
89
92
  <li><strong>Display Name</strong> - The display name for the web application
112
115
      </ul>
113
116
  </li>
114
117
</ul>
115
 
</p>
116
118
 
117
119
<subsection name="Start">
118
120
 
128
130
</source>
129
131
 
130
132
<p>Otherwise, the Message will start with <code>FAIL</code> and include an
131
 
error message.  Possible causes for problems include:
 
133
error message.  Possible causes for problems include:</p>
132
134
<ul>
133
135
<li><em>Encountered exception</em>
134
136
    <blockquote>             
151
153
    The <code>path</code> parameter is required.
152
154
    </blockquote></li>       
153
155
</ul>
154
 
</p>
155
156
 
156
157
</subsection>
157
158
 
168
169
</source>
169
170
                             
170
171
<p>Otherwise, the Message will start with <code>FAIL</code> and include an
171
 
error message.  Possible causes for problems include:
 
172
error message.  Possible causes for problems include:</p>
172
173
<ul>                         
173
174
<li><em>Encountered exception</em>
174
175
    <blockquote>             
191
192
    The <code>path</code> parameter is required.
192
193
    </blockquote></li>       
193
194
</ul>
194
 
</p>
195
195
 
196
196
</subsection>
197
197
 
216
216
</source>
217
217
 
218
218
<p>Otherwise, the Message will start with <code>FAIL</code> and include an
219
 
error message.  Possible causes for problems include:
 
219
error message.  Possible causes for problems include:</p>
220
220
<ul>
221
221
<li><em>Encountered exception</em>
222
222
    <blockquote>             
249
249
    the application again to pick up your changes.
250
250
    </blockquote></li>       
251
251
</ul>
252
 
</p>
253
252
 
254
253
</subsection>
255
254
 
274
273
</source>
275
274
                             
276
275
<p>Otherwise, the Message will start with <code>FAIL</code> and include an
277
 
error message.  Possible causes for problems include:
 
276
error message.  Possible causes for problems include:</p>
278
277
<ul>                         
279
278
<li><em>Encountered exception</em>
280
279
    <blockquote>             
297
296
    The <code>path</code> parameter is required.
298
297
    </blockquote></li>       
299
298
</ul>
300
 
</p>
301
299
 
302
300
</subsection>
303
301
 
334
332
 
335
333
<p>In this example the web application located in the directory
336
334
<code>C:\path\to\foo</code> on the Tomcat server (running on Windows)
337
 
is deployed as the web application context named <code>/footoo</code>.
 
335
is deployed as the web application context named <code>/footoo</code>.</p>
338
336
<source>
339
337
Context Path: /footoo
340
338
WAR or Directory URL: file:C:/path/to/foo
341
339
</source>
342
 
</p>
 
340
 
343
341
 
344
342
<p>In this example the ".war" file <code>/path/to/bar.war</code> on the
345
343
Tomcat server (running on Unix) is deployed as the web application
346
344
context named <code>/bar</code>. Notice that there is no <code>path</code>
347
345
parameter so the context path defaults to the name of the web application
348
 
archive file without the ".war" extension.
 
346
archive file without the ".war" extension.</p>
349
347
<source>
350
348
WAR or Directory URL: jar:file:/path/to/bar.war!/
351
349
</source>
352
 
</p>
 
350
 
353
351
 
354
352
<h3>Deploy a Directory or War from the Host appBase</h3>
355
353
 
361
359
<code>foo</code> in the Host appBase directory of the Tomcat server is
362
360
deployed as the web application context named <code>/foo</code>. Notice
363
361
that there is no <code>path</code> parameter so the context path defaults
364
 
to the name of the web application directory.
 
362
to the name of the web application directory.</p>
365
363
<source>
366
364
WAR or Directory URL: foo
367
365
</source>
368
 
</p>
 
366
 
369
367
 
370
368
<p>In this example the ".war" file <code>bar.war</code> located in your
371
369
Host appBase directory on the Tomcat server is deployed as the web
372
 
application context named <code>/bartoo</code>.
 
370
application context named <code>/bartoo</code>.</p>
373
371
<source>
374
372
Context Path: /bartoo
375
373
WAR or Directory URL: bar.war
376
374
</source>
377
 
</p>
 
375
 
378
376
 
379
377
<h3>Deploy using a Context configuration ".xml" file</h3>
380
378
 
387
385
<p>A Context configuration ".xml" file can contain valid XML for a
388
386
web application Context just as if it were configured in your
389
387
Tomcat <code>server.xml</code> configuration file. Here is an
390
 
example for Tomcat running on Windows:
 
388
example for Tomcat running on Windows:</p>
391
389
<source>
392
390
&lt;Context path="/foobar" docBase="C:\path\to\application\foobar"
393
391
         debug="0"&gt;
398
396
 
399
397
&lt;/Context&gt;
400
398
</source>
401
 
</p>
 
399
 
402
400
 
403
401
<p>Use of the <i>WAR or Directory URL</i> is optional. When used
404
402
to select a web application ".war" file or directory it overrides any
405
403
docBase configured in the context configuration ".xml" file.</p>
406
404
 
407
405
<p>Here is an example of installing an application using a Context
408
 
configuration ".xml" file for Tomcat running on Windows.
 
406
configuration ".xml" file for Tomcat running on Windows.</p>
409
407
<source>
410
408
XML Configuration file URL: file:C:/path/to/context.xml
411
409
</source>
412
 
</p>
 
410
 
413
411
 
414
412
<p>Here is an example of installing an application using a Context
415
413
configuration ".xml" file and a web application ".war" file located
416
 
on the server (Tomcat running on Unix).
 
414
on the server (Tomcat running on Unix).</p>
417
415
<source>
418
416
XML Configuration file URL: file:/path/to/context.xml
419
417
WAR or Directory URL: jar:file:/path/to/bar.war!/
420
418
</source>
421
 
</p>
 
419
 
422
420
 
423
421
</subsection>
424
422
 
546
544
</subsection>
547
545
</section>
548
546
 
 
547
<section name="Diagnostics">
 
548
 
 
549
<subsection name="Finding memory leaks">
 
550
 
 
551
<p><strong>The find leaks diagnostic triggers a full garbage collection. It
 
552
should be used with extreme caution on production systems.</strong></p>
 
553
 
 
554
<p>The find leaks diagnostic attempts to identify web applications that have
 
555
caused memory leaks when they were stopped, reloaded or undeployed. Results
 
556
should always be confirmed
 
557
with a profiler. The diagnostic uses additional functionality provided by the
 
558
StandardHost implementation. It will not work if a custom host is used that
 
559
does not extend StandardHost.</p>
 
560
 
 
561
<p>This diagnostic will list context paths for the web applications that were
 
562
stopped, reloaded or undeployed, but which classes from the previous runs
 
563
are still present in memory, thus being a memory leak. If an application
 
564
has been reloaded several times, it may be listed several times.</p>
 
565
 
 
566
<p>Explicitly triggering a full garbage collection from Java code is documented
 
567
to be unreliable. Furthermore, depending on the JVM used, there are options to
 
568
disable explicit GC triggering, like <code>-XX:+DisableExplicitGC</code>.
 
569
If you want to make sure, that the diagnostics were successfully running a full GC,
 
570
you will need to check using tools like GC logging, JConsole or similar.</p>
 
571
 
 
572
</subsection>
 
573
</section>
 
574
 
549
575
<section name="Server Information">
550
576
 
551
577
<p>This section displays information about Tomcat, the operating system of