source: nutchez-0.1/tomcat/webapps/docs/manager-howto.html @ 95

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

NutchEz - an easy way to nutch

File size: 96.1 KB
RevLine 
[66]1<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Apache Tomcat 6.0 - Manager App HOW-TO</title><meta value="Craig R. McClanahan" name="author"><meta value="craigmcc@apache.org" name="email"></head><body vlink="#525D76" alink="#525D76" link="#525D76" text="#000000" bgcolor="#ffffff"><table cellspacing="0" width="100%" border="0"><!--PAGE HEADER--><tr><td><!--PROJECT LOGO--><a href="http://tomcat.apache.org/"><img border="0" alt="
2      The Apache Tomcat Servlet/JSP Container
3    " align="right" src="./images/tomcat.gif"></a></td><td><font face="arial,helvetica,sanserif"><h1>Apache Tomcat 6.0</h1></font></td><td><!--APACHE LOGO--><a href="http://www.apache.org/"><img border="0" alt="Apache Logo" align="right" src="./images/asf-logo.gif"></a></td></tr></table><table cellspacing="4" width="100%" border="0"><!--HEADER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade></td></tr><tr><!--LEFT SIDE NAVIGATION--><td nowrap="true" valign="top" width="20%"><p><strong>Links</strong></p><ul><li><a href="index.html">Docs Home</a></li><li><a href="http://wiki.apache.org/tomcat/FAQ">FAQ</a></li></ul><p><strong>User Guide</strong></p><ul><li><a href="introduction.html">1) Introduction</a></li><li><a href="setup.html">2) Setup</a></li><li><a href="appdev/index.html">3) First webapp</a></li><li><a href="deployer-howto.html">4) Deployer</a></li><li><a href="manager-howto.html">5) Manager</a></li><li><a href="realm-howto.html">6) Realms and AAA</a></li><li><a href="security-manager-howto.html">7) Security Manager</a></li><li><a href="jndi-resources-howto.html">8) JNDI Resources</a></li><li><a href="jndi-datasource-examples-howto.html">9) JDBC DataSources</a></li><li><a href="class-loader-howto.html">10) Classloading</a></li><li><a href="jasper-howto.html">11) JSPs</a></li><li><a href="ssl-howto.html">12) SSL</a></li><li><a href="ssi-howto.html">13) SSI</a></li><li><a href="cgi-howto.html">14) CGI</a></li><li><a href="proxy-howto.html">15) Proxy Support</a></li><li><a href="mbeans-descriptor-howto.html">16) MBean Descriptor</a></li><li><a href="default-servlet.html">17) Default Servlet</a></li><li><a href="cluster-howto.html">18) Clustering</a></li><li><a href="balancer-howto.html">19) Load Balancer</a></li><li><a href="connectors.html">20) Connectors</a></li><li><a href="monitoring.html">21) Monitoring and Management</a></li><li><a href="logging.html">22) Logging</a></li><li><a href="apr.html">23) APR/Native</a></li><li><a href="virtual-hosting-howto.html">24) Virtual Hosting</a></li><li><a href="aio.html">25) Advanced IO</a></li><li><a href="extras.html">26) Additional Components</a></li><li><a href="maven-jars.html">27) Mavenized</a></li></ul><p><strong>Reference</strong></p><ul><li><a href="RELEASE-NOTES.txt">Release Notes</a></li><li><a href="config/index.html">Configuration</a></li><li><a href="api/index.html">Javadocs</a></li><li><a href="http://tomcat.apache.org/connectors-doc/">JK 1.2 Documentation</a></li></ul><p><strong>Apache Tomcat Development</strong></p><ul><li><a href="building.html">Building</a></li><li><a href="changelog.html">Changelog</a></li><li><a href="http://wiki.apache.org/tomcat/TomcatVersions">Status</a></li><li><a href="developers.html">Developers</a></li><li><a href="architecture/index.html">Architecture</a></li><li><a href="funcspecs/index.html">Functional Specs.</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td align="left" valign="top" width="80%"><table cellspacing="4" width="100%" border="0"><tr><td valign="top" align="left"><h1>Apache Tomcat 6.0</h1><h2>Manager App HOW-TO</h2></td><td nowrap="true" valign="top" align="right"><small><a href="printer/manager-howto.html"><img alt="Printer Friendly Version" border="0" src="./images/printer.gif"><br>print-friendly<br>version
4                    </a></small></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Table of Contents"><strong>Table of Contents</strong></a></font></td></tr><tr><td><blockquote>
5
6<p>
7<a href="#Introduction">Introduction</a><br>
8<a href="#Configuring Manager Application Access">
9Configuring Manager Application Access</a><br>
10<a href="#Supported Manager Commands">Supported Manager Commands</a><br>
11<blockquote>
12<a href="#Deploy A New Application Remotely">Deploy A New Application Remotely</a><br>
13<a href="#Deploy A New Application from a Local Path">Deploy A New Application from a Local Path</a><br>
14<a href="#List Currently Deployed Applications">
15List Currently Deployed Applications</a><br>
16<a href="#Reload An Existing Application">Reload An Existing Application</a><br>
17<a href="#List OS and JVM Properties">List OS and JVM Properties</a><br>
18<a href="#List Available Global JNDI Resources">
19List Available Global JNDI Resources</a><br>
20<a href="#List Available Security Roles">List Available Security Roles</a><br>
21<a href="#Session Statistics">Session Statistics</a><br>
22<a href="#Start an Existing Application">Start an Existing Application</a><br>
23<a href="#Stop an Existing Application">Stop an Existing Application</a><br>
24<a href="#Undeploy an Existing Application">
25Undeploy an Existing Application</a><br>
26</blockquote>
27<a href="#Executing Manager Commands With Ant">
28Executing Manager Commands With Ant</a><br>
29<a href="#Using the JMX Proxy Servlet">
30Using the JMX Proxy Servlet</a><br>
31<blockquote>
32<a href="#What is JMX Proxy Servlet">What is JMX Proxy Servlet?</a><br>
33<a href="#JMX Query command">Query command</a><br>
34<a href="#JMX Set command">Set command</a><br>
35</blockquote>
36</p>
37
38</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Introduction"><strong>Introduction</strong></a></font></td></tr><tr><td><blockquote>
39
40<p>In many production environments, it is very useful to have the capability
41to deploy a new web application, or undeploy an existing one, without having
42to shut down and restart the entire container.  In addition, you can request
43an existing application to reload itself, even if you have not declared it
44to be <code>reloadable</code> in the Tomcat 6 server
45configuration file.</p>
46
47<p>To support these capabilities, Tomcat 6 includes a web application
48(installed by default on context path <code>/manager</code>) that supports
49the following functions:</p>
50<ul>
51<li>Deploy a new web application from the uploaded contents of a WAR file.</li>
52<li>Deploy a new web application, on a specified context path, from the
53    server file system.</li>
54<li>List the currently deployed web applications, as well as the
55    sessions that are currently active for those web apps.</li>
56<li>Reload an existing web application, to reflect changes in the
57    contents of <code>/WEB-INF/classes</code> or <code>/WEB-INF/lib</code>.
58    </li>
59<li>List the OS and JVM property values.</li>
60<li>List the available global JNDI resources, for use in deployment
61    tools that are preparing <code>&lt;ResourceLink&gt;</code> elements
62    nested in a <code>&lt;Context&gt;</code> deployment description.</li>
63<li>List the available security roles defined in the user database.</li>
64<li>Start a stopped application (thus making it available again).</li>
65<li>Stop an existing application (so that it becomes unavailable), but
66    do not undeploy it.</li>
67<li>Undeploy a deployed web application and delete its document base
68    directory (unless it was deployed from file system).</li>
69</ul>
70
71<p>A default Tomcat installation includes the manager. To add an instance of the
72Manager web application <code>Context</code> to a new host install the
73<code>manager.xml</code> context configuration file in the
74<code>$CATALINA_BASE/conf/[enginename]/[hostname]</code> folder. Here is an
75example:
76<pre>
77&lt;Context path="/manager" debug="0" privileged="true"
78         docBase="/usr/local/kinetic/tomcat6/server/webapps/manager"&gt;
79&lt;/Context&gt;
80</pre>
81</p>
82
83<p>If you have Tomcat configured to support multiple virtual hosts
84(websites) you would need to configure a Manager for each.</p>
85
86<p>There are three ways to use the <code>Manager</code> web application.
87<ul>
88<li>As an application with a user interface you use in your browser.
89Here is an example URL where you can replace <code>localhost</code> with
90your website host name:  <code>http://localhost/manager/html/</code> .</li>
91<li>A minimal version using HTTP requests only which is suitable for use
92by scripts setup by system administrators.  Commands are given as part of the
93request URI, and responses are in the form of simple text that can be easily
94parsed and processed.  See <a href="#Supported Manager Commands">
95Supported Manager Commands</a> for more information.</li>
96<li>A convenient set of task definitions for the <em>Ant</em>
97(version 1.4 or later) build tool.  See
98<a href="#Executing Manager Commands With Ant">Executing Manager Commands
99With Ant</a> for more information.</li>
100</ul>
101</p>
102
103</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Configuring Manager Application Access"><strong>Configuring Manager Application Access</strong></a></font></td></tr><tr><td><blockquote>
104
105    <blockquote><em>
106    <p>The description below uses the variable name $CATALINA_BASE to refer the
107    base directory against which most relative paths are resolved. If you have
108    not configured Tomcat 6 for multiple instances by setting a CATALINA_BASE
109    directory, then $CATALINA_BASE will be set to the value of $CATALINA_HOME,
110    the directory into which you have installed Tomcat 6.</p>
111    </em></blockquote>
112
113<p>It would be quite unsafe to ship Tomcat with default settings that allowed
114anyone on the Internet to execute the Manager application on your server.
115Therefore, the Manager application is shipped with the requirement that anyone
116who attempts to use it must authenticate themselves, using a username and
117password that have the role <strong>manager</strong> associated with them.
118Further, there is no username in the default users file
119(<conf>$CATALINA_BASE/conf/tomcat-users.xml</conf>) that is assigned this
120role.  Therefore, access to the Manager application is completely disabled
121by default.</p>
122
123<p>To enable access to the Manager web application, you must either create
124a new username/password combination and associate the role name
125<strong>manager</strong> with it, or add the <strong>manager</strong> role
126to some existing username/password combination.  Exactly where this is done
127depends on which <code>Realm</code> implementation you are using:</p>
128<ul>
129<li><em>MemoryRealm</em> - If you have not customized your
130    <code>$CATALINA_BASE/conf/server.xml</code> to select a different one,
131    Tomcat 6 defaults to an XML-format file stored at
132    <code>$CATALINA_BASE/conf/tomcat-users.xml</code>, which can be
133    edited with any text editor.  This file contains an XML
134    <code>&lt;user&gt;</code> for each individual user, which might
135    look something like this:
136<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
137&lt;user name="craigmcc" password="secret" roles="standard,manager" /&gt;
138</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
139    which defines the username and password used by this individual to
140    log on, and the role names he or she is associated with.  You can
141    add the <strong>manager</strong> role to the comma-delimited
142    <code>roles</code> attribute for one or more existing users, and/or
143    create new users with that assigned role.</li>
144<li><em>JDBCRealm</em> - Your user and role information is stored in
145    a database accessed via JDBC.  Add the <strong>manager</strong> role
146    to one or more existing users, and/or create one or more new users
147    with this role assigned, following the standard procedures for your
148    environment.</li>
149<li><em>JNDIRealm</em> - Your user and role information is stored in
150    a directory server accessed via LDAP.  Add the <strong>manager</strong>
151    role to one or more existing users, and/or create one or more new users
152    with this role assigned, following the standard procedures for your
153    environment.</li>
154</ul>
155
156<p>The first time you attempt to issue one of the Manager commands
157described in the next section, you will be challenged to log on using
158BASIC authentication.  The username and password you enter do not matter,
159as long as they identify a valid user in the users database who possesses
160the role <strong>manager</strong>.</p>
161
162<p>In addition to the password restrictions the manager web application
163could be restricted by the remote IP address or host by adding a
164<code>RemoteAddrValve</code> or <code>RemoteHostValve</code>.  Here is
165an example of restricting access to the localhost by IP address:
166<pre>
167&lt;Context path="/manager" privileged="true"
168         docBase="/usr/local/kinetic/tomcat6/server/webapps/manager"&gt;
169         &lt;Valve className="org.apache.catalina.valves.RemoteAddrValve"
170                allow="127\.0\.0\.1"/&gt;
171&lt;/Context&gt;
172</pre>
173</p>
174</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Supported Manager Commands"><strong>Supported Manager Commands</strong></a></font></td></tr><tr><td><blockquote>
175
176<p>All commands that the Manager application knows how to process are
177specified in a single request URI like this:</p>
178<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
179http://{host}:{port}/manager/{command}?{parameters}
180</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
181<p>where <code>{host}</code> and <code>{port}</code> represent the hostname
182and port number on which Tomcat is running, <code>{command}</code>
183represents the Manager command you wish to execute, and
184<code>{parameters}</code> represents the query parameters
185that are specific to that command.  In the illustrations below, customize
186the host and port appropriately for your installation.</p>
187
188<p>Most commands accept one or more of the following query parameters:</p>
189<ul>
190<li><strong>path</strong> - The context path (including the leading slash)
191    of the web application you are dealing with.  To select the ROOT web
192    application, specify "/".  <strong>NOTE</strong> -
193    It is not possible to perform administrative commands on the
194    Manager application itself.</li>
195<li><strong>war</strong> - URL of a web application archive (WAR) file,
196    pathname of a directory which contains the web application, or a
197    Context configuration ".xml" file.  You can use URLs in any of the
198    following formats:
199    <ul>
200    <li><strong>file:/absolute/path/to/a/directory</strong> - The absolute
201        path of a directory that contains the unpacked version of a web
202        application.  This directory will be attached to the context path
203        you specify without any changes.</li>
204    <li><strong>file:/absolute/path/to/a/webapp.war</strong> - The absolute
205        path of a web application archive (WAR) file.  This is valid
206        <strong>only</strong> for the <code>/deploy</code> command, and is
207        the only acceptable format to that command.</li>
208    <li><strong>jar:file:/absolute/path/to/a/warfile.war!/</strong> - The
209        URL to a local web application archive (WAR) file.  You can use any
210        syntax that is valid for the <code>JarURLConnection</code> class
211        for reference to an entire JAR file.</li>
212    <li><strong>file:/absolute/path/to/a/context.xml</strong> - The
213        absolute path of a web application Context configuration ".xml"
214        file which contains the Context configuration element.</li>
215    <li><strong>directory</strong> - The directory name for the web
216        applciation context in the Host's application base directory.</li>
217    <li><strong>webapp.war</strong> - The name of a web application war file
218        located in the Host's application base directory.</li>
219    </ul></li>
220</ul>
221
222<p>Each command will return a response in <code>text/plain</code> format
223(i.e. plain ASCII with no HTML markup), making it easy for both humans and
224programs to read).  The first line of the response wil begin with either
225<code>OK</code> or <code>FAIL</code>, indicating whether the requested
226command was successful or not.  In the case of failure, the rest of the first
227line will contain a description of the problem that was encountered.  Some
228commands include additional lines of information as described below.</p>
229
230<p><em>Internationalization Note</em> - The Manager application looks up
231its message strings in resource bundles, so it is possible that the strings
232have been translated for your platform.  The examples below show the English
233version of the messages.</p>
234
235<blockquote><em>
236<p><strong>WARNING:</strong>  the legacy commands <code>/install</code> and
237<code>/remove</code> are deprecated.
238They are presently equivalent to <code>/deploy</code> and <code>/undeploy</code>,
239but could be removed in a future release.</p>
240</em></blockquote>
241
242<table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Deploy A New Application Remotely"><strong>Deploy A New Application Remotely</strong></a></font></td></tr><tr><td><blockquote>
243
244<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
245http://localhost:8080/manager/deploy?path=/foo
246</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
247
248<p>Upload the web application archive (WAR) file that is specified as the
249request data in this HTTP PUT request, install it into the <code>appBase</code>
250directory of our corresponding virtual host, and start , using the directory
251name or the war file name without the .war extension as the path.  The
252application can later be undeployed (and the corresponding application directory
253removed) by use of the <code>/undeploy</code> command.</p>
254
255<p>The .WAR file may include Tomcat specific deployment configuration, by
256including a Context configuration XML file in
257<code>/META-INF/context.xml</code>.</p>
258
259<p>URL parameters include:
260<ul>
261<li><code>update</code>: When set to true, any existing update will be
262    undeployed first. The default value is set to false.</li>
263<li><code>tag</code>: Specifying a tag name, this allows associating the
264    deployed webapp with a version number. The application version can
265    be later redeployed when needed using only the tag.</li>
266</ul>
267</p>
268
269<p><strong>NOTE</strong> - This command is the logical
270opposite of the <code>/undeploy</code> command.</p>
271
272<p>If installation and startup is successful, you will receive a response
273like this:</p>
274<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
275OK - Deployed application at context path /foo
276</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
277
278<p>Otherwise, the response will start with <code>FAIL</code> and include an
279error message.  Possible causes for problems include:</p>
280<ul>
281<li><em>Application already exists at path /foo</em>
282    <blockquote>
283    <p>The context paths for all currently running web applications must be
284    unique.  Therefore, you must undeploy the existing web
285    application using this context path, or choose a different context path
286    for the new one. The <code>update</code> parameter may be specified as
287    a parameter on the URL, with a value of <code>true</code> to avoid this
288    error. In that case, an undeploy will be performed on an existing
289    application before performing the deployment.</p>
290    </blockquote></li>
291<li><em>Encountered exception</em>
292    <blockquote>
293    <p>An exception was encountered trying to start the new web application.
294    Check the Tomcat 6 logs for the details, but likely explanations include
295    problems parsing your <code>/WEB-INF/web.xml</code> file, or missing
296    classes encountered when initializing application event listeners and
297    filters.</p>
298    </blockquote></li>
299</ul>
300
301</blockquote></td></tr></table>
302
303<table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Deploy A New Application from a Local Path"><strong>Deploy A New Application from a Local Path</strong></a></font></td></tr><tr><td><blockquote>
304
305<p>Deploy and start a new web application, attached to the specified context
306<code>path</code> (which must not be in use by any other web application).
307This command is the logical opposite of the <code>/undeploy</code> command.</p>
308
309<p>There are a number of different ways the deploy command can be used.</p>
310
311<h3>Deploy a version of a previously deployed webapp</h3>
312
313<p>This can be used to deploy a previous version of a web application, which
314has been deployed using the <code>tag</code> attribute. Note that the work
315directory for the manager webapp will contain the previously deployed WARs;
316removing it would make the deployment fail.
317<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
318http://localhost:8080/manager/deploy?path=/footoo&amp;tag=footag
319</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
320</p>
321
322<h3>Deploy a Directory or WAR by URL</h3>
323
324<p>Deploy a web application directory or ".war" file located on the Tomcat
325server. If no <code>path</code> is specified, the directory name or the war file
326name without the ".war" extension is used as the path. The <code>war</code>
327parameter specifies a URL (including the <code>file:</code> scheme) for either
328a directory or a web application archive (WAR) file. The supported syntax for
329a URL referring to a WAR file is described on the Javadocs page for the
330<code>java.net.JarURLConnection</code> class.  Use only URLs that refer to
331the entire WAR file.</p>
332
333<p>In this example the web application located in the directory
334<code>/path/to/foo</code> on the Tomcat server is deployed as the
335web application context named <code>/footoo</code>.
336<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
337http://localhost:8080/manager/deploy?path=/footoo&amp;war=file:/path/to/foo
338</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
339</p>
340
341<p>In this example the ".war" file <code>/path/to/bar.war</code> on the
342Tomcat server is deployed as the web application context named
343<code>/bar</code>. Notice that there is no <code>path</code> parameter
344so the context path defaults to the name of the web application archive
345file without the ".war" extension.
346<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
347http://localhost:8080/manager/deploy?war=jar:file:/path/to/bar.war!/
348</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
349</p>
350
351<h3>Deploy a Directory or War from the Host appBase</h3>
352
353<p>Deploy a web application directory or ".war" file located in your Host
354appBase directory. The directory name or the war file name without the ".war"
355extension is used as the path.</p>
356
357<p>In this example the web application located in a sub directory named
358<code>foo</code> in the Host appBase directory of the Tomcat server is
359deployed as the web application context named <code>/foo</code>. Notice
360that the context path used is the name of the web application directory.
361<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
362http://localhost:8080/manager/deploy?war=foo
363</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
364</p>
365
366<p>In this example the ".war" file <code>bar.war</code> located in your
367Host appBase directory on the Tomcat server is deployed as the web
368application context named <code>/bar</code>.
369<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
370http://localhost:8080/manager/deploy?war=bar.war
371</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
372</p>
373
374<h3>Deploy using a Context configuration ".xml" file</h3>
375
376<p>If the Host deployXML flag is set to true you can deploy a web
377application using a Context configuration ".xml" file and an optional
378".war" file or web application directory. The context <code>path</code>
379is not used when deploying a web application using a context ".xml"
380configuration file.</p>
381
382<p>A Context configuration ".xml" file can contain valid XML for a
383web application Context just as if it were configured in your
384Tomcat <code>server.xml</code> configuration file. Here is an
385example:
386<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
387&lt;Context path="/foobar" docBase="/path/to/application/foobar"
388         debug="0"&gt;
389
390  &lt;!-- Link to the user database we will get roles from --&gt;
391  &lt;ResourceLink name="users" global="UserDatabase"
392                type="org.apache.catalina.UserDatabase"/&gt;
393
394&lt;/Context&gt;
395</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
396</p>
397
398<p>When the optional <code>war</code> parameter is set to the URL
399for a web application ".war" file or directory it overrides any
400docBase configured in the context configuration ".xml" file.</p>
401
402<p>Here is an example of deploying an application using a Context
403configuration ".xml" file.
404<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
405http://localhost:8080/manager/deploy?config=file:/path/context.xml
406</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
407</p>
408
409<p>Here is an example of deploying an application using a Context
410configuration ".xml" file and a web application ".war" file located
411on the server.
412<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
413http://localhost:8080/manager/deploy?config=file:/path/context.xml&amp;war=jar:file:/path/bar.war!/
414</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
415</p>
416
417<h3>Deployment Notes</h3>
418
419<p>If the Host is configured with unpackWARs=true and you deploy a war
420file, the war will be unpacked into a directory in your Host appBase
421directory.</p>
422
423<p>If the application war or directory is installed in your Host appBase
424directory and either the Host is configured with autoDeploy=true or
425liveDeploy=true, the Context path must match the directory name or
426war file name without the ".war" extension.</p>
427
428<p>For security when untrusted users can manage web applications, the
429Host deployXML flag can be set to false.  This prevents untrusted users
430from deploying web applications using a configuration XML file and
431also prevents them from deploying application directories or ".war"
432files located outside of their Host appBase.</p>
433
434
435<h3>Deploy Response</h3>
436
437<p>If installation and startup is successful, you will receive a response
438like this:</p>
439<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
440OK - Deployed application at context path /foo
441</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
442
443<p>Otherwise, the response will start with <code>FAIL</code> and include an
444error message.  Possible causes for problems include:</p>
445<ul>
446<li><em>Application already exists at path /foo</em>
447    <blockquote>
448    <p>The context paths for all currently running web applications must be
449    unique.  Therefore, you must undeploy the existing web
450    application using this context path, or choose a different context path
451    for the new one. The <code>update</code> parameter may be specified as
452    a parameter on the URL, with a value of <code>true</code> to avoid this
453    error. In that case, an undeploy will be performed on an existing
454    application before performing the deployment.</p>
455    </blockquote></li>
456<li><em>Document base does not exist or is not a readable directory</em>
457    <blockquote>
458    <p>The URL specified by the <code>war</code> parameter must identify a
459    directory on this server that contains the "unpacked" version of a
460    web application, or the absolute URL of a web application archive (WAR)
461    file that contains this application.  Correct the value specified by
462    the <code>war</code> parameter.</p>
463    </blockquote></li>
464<li><em>Encountered exception</em>
465    <blockquote>
466    <p>An exception was encountered trying to start the new web application.
467    Check the Tomcat 6 logs for the details, but likely explanations include
468    problems parsing your <code>/WEB-INF/web.xml</code> file, or missing
469    classes encountered when initializing application event listeners and
470    filters.</p>
471    </blockquote></li>
472<li><em>Invalid application URL was specified</em>
473    <blockquote>
474    <p>The URL for the directory or web application that you specified
475    was not valid.  Such URLs must start with <code>file:</code>, and URLs
476    for a WAR file must end in ".war".</p>
477    </blockquote></li>
478<li><em>Invalid context path was specified</em>
479    <blockquote>
480    <p>The context path must start with a slash character. To reference the
481    ROOT web application use "/".</p>
482    </blockquote></li>
483<li><em>Context path must match the directory or WAR file name:</em>
484    <blockquote>
485    If the application war or directory is installed in your Host appBase
486    directory and either the Host is configured with autoDeploy=true or
487    liveDeploy=true, the Context path must match the directory name or
488    war file name without the ".war" extension.
489    </blockquote></li>
490<li><em>Only web applications in the Host web application directory can
491     be installed</em>
492     <blockquote>
493     If the Host deployXML flag is set to false this error will happen
494     if an attempt is made to deploy a web application directory or
495      ".war" file outside of the Host appBase directory.
496     </blockquote></li>
497</ul>
498
499</blockquote></td></tr></table>
500
501<table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="List Currently Deployed Applications"><strong>List Currently Deployed Applications</strong></a></font></td></tr><tr><td><blockquote>
502
503<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
504http://localhost:8080/manager/list
505</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
506
507<p>List the context paths, current status (<code>running</code> or
508<code>stopped</code>), and number of active sessions for all currently
509deployed web applications.  A typical response immediately
510after starting Tomcat might look like this:</p>
511<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
512OK - Listed applications for virtual host localhost
513/webdav:running:0
514/examples:running:0
515/manager:running:0
516/:running:0
517</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
518
519</blockquote></td></tr></table>
520
521<table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Reload An Existing Application"><strong>Reload An Existing Application</strong></a></font></td></tr><tr><td><blockquote>
522
523<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
524http://localhost:8080/manager/reload?path=/examples
525</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
526
527<p>Signal an existing application to shut itself down and reload.  This can
528be useful when the web application context is not reloadable and you have
529updated classes or property files in the <code>/WEB-INF/classes</code>
530directory or when you have added or updated jar files in the
531<code>/WEB-INF/lib</code> directory.
532</p>
533<p><strong>NOTE:</strong> The <code>/WEB-INF/web.xml</code>
534web application configuration file is not reread on a reload.
535If you have made changes to your web.xml file you must stop
536then start the web application.
537</p>
538
539<p>If this command succeeds, you will see a response like this:</p>
540<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
541OK - Reloaded application at context path /examples
542</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
543
544<p>Otherwise, the response will start with <code>FAIL</code> and include an
545error message.  Possible causes for problems include:</p>
546<ul>
547<li><em>Encountered exception</em>
548    <blockquote>
549    <p>An exception was encountered trying to restart the web application.
550    Check the Tomcat 6 logs for the details.</p>
551    </blockquote></li>
552<li><em>Invalid context path was specified</em>
553    <blockquote>
554    <p>The context path must start with a slash character. To reference the
555    ROOT web application use "/".</p>
556    </blockquote></li>
557<li><em>No context exists for path /foo</em>
558    <blockquote>
559    <p>There is no deployed application on the context path
560    that you specified.</p>
561    </blockquote></li>
562<li><em>No context path was specified</em>
563    <blockquote>
564    The <code>path</code> parameter is required.
565    </blockquote></li>
566<li><em>Reload not supported on WAR deployed at path /foo</em>
567    <blockquote>
568    Currently, application reloading (to pick up changes to the classes or
569    <code>web.xml</code> file) is not supported when a web application is
570    deployed directly from a WAR file.  It only works when the web application
571    is deployed from an unpacked directory.  If you are using a WAR file,
572    you should <code>undeploy</code> and then <code>deploy</code> or
573    <code>deploy</code> with the <code>update</code> parameter the
574    application again to pick up your changes.
575    </blockquote></li>
576</ul>
577
578</blockquote></td></tr></table>
579
580<table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="List OS and JVM Properties"><strong>List OS and JVM Properties</strong></a></font></td></tr><tr><td><blockquote>
581
582<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
583http://localhost:8080/manager/serverinfo
584</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
585
586<p>Lists information about the Tomcat version, OS, and JVM properties.</p>
587
588<p>If an error occurs, the response will start with <code>FAIL</code> and
589include an error message.  Possible causes for problems include:</p>
590<ul>
591<li><em>Encountered exception</em>
592    <blockquote>
593    <p>An exception was encountered trying to enumerate the system properties.
594    Check the Tomcat 6 logs for the details.</p>
595    </blockquote></li>
596</ul>
597
598</blockquote></td></tr></table>
599
600<table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="List Available Global JNDI Resources"><strong>List Available Global JNDI Resources</strong></a></font></td></tr><tr><td><blockquote>
601
602<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
603http://localhost:8080/manager/resources[?type=xxxxx]
604</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
605
606<p>List the global JNDI resources that are available for use in resource
607links for context configuration files.  If you specify the <code>type</code>
608request parameter, the value must be the fully qualified Java class name of
609the resource type you are interested in (for example, you would specify
610<code>javax.sql.DataSource</code> to acquire the names of all available
611JDBC data sources).  If you do not specify the <code>type</code> request
612parameter, resources of all types will be returned.</p>
613
614<p>Depending on whether the <code>type</code> request parameter is specfied
615or not, the first line of a normal response will be:</p>
616<pre>
617  OK - Listed global resources of all types
618</pre>
619<p>or</p>
620<pre>
621  OK - Listed global resources of type xxxxx
622</pre>
623<p>followed by one line for each resource.  Each line is composed of fields
624delimited by colon characters (":"), as follows:</p>
625<ul>
626<li><em>Global Resource Name</em> - The name of this global JNDI resource,
627    which would be used in the <code>global</code> attribute of a
628    <code>&lt;ResourceLink&gt;</code> element.</li>
629<li><em>Global Resource Type</em> - The fully qualified Java class name of
630    this global JNDI resource.</li>
631</ul>
632
633<p>If an error occurs, the response will start with <code>FAIL</code> and
634include an error message.  Possible causes for problems include:</p>
635<ul>
636<li><em>Encountered exception</em>
637    <blockquote>
638    <p>An exception was encountered trying to enumerate the global JNDI
639    resources.  Check the Tomcat 6 logs for the details.</p>
640    </blockquote></li>
641<li><em>No global JNDI resources are available</em>
642    <blockquote>
643    <p>The Tomcat server you are running has been configured without
644    global JNDI resources.</p>
645    </blockquote></li>
646</ul>
647
648
649</blockquote></td></tr></table>
650
651
652<table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="List Available Security Roles"><strong>List Available Security Roles</strong></a></font></td></tr><tr><td><blockquote>
653
654<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
655http://localhost:8080/manager/roles
656</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
657
658<p>List the security role names (and corresponding descriptions) that are
659available in the <code>org.apache.catalina.UserDatabase</code> resource that
660is linked to the <code>users</code> resource reference in the web.xml file
661for the Manager web application.  This would typically be used, for example,
662by a deployment tool that wanted to create
663<code>&lt;security-role-ref&gt;</code> elements to map security role names
664used in a web application to the role names actually defined within the
665container.</p>
666
667<p>By default, the <code>users</code> resource reference is pointed at the
668global <code>UserDatabase</code> resource.  If you choose to utilize a
669different user database per virtual host, you should modify the
670<code>&lt;ResourceLink&gt;</code> element in the default
671<code>manager.xml</code> context configuration file to point at the global
672user database resource for this virtual host.</p>
673
674<p>When this command is executed, the first line of the response will be:</p>
675<pre>
676  OK - Listed security roles
677</pre>
678<p>followed by one line for each security role.  Each line is composed of
679fields delimited by colon characters (":") as follows:</p>
680<ul>
681<li><em>Security Role Name</em> - A security role name that is known to Tomcat
682    in the user database.</li>
683<li><em>Description</em> - Description of this security role (useful in
684    creating user interfaces for selecting roles.</li>
685</ul>
686
687<p>If an error occurs, the response will start with <code>FAIL</code> and
688include an error message.  Possible causes for problems include:</p>
689<ul>
690<li><em>Cannot resolve user database reference</em> - A JNDI error prevented
691    the successful lookup of the <code>org.apache.catalina.UserDatabase</code>
692    resource.  Check the Tomcat log files for a stack trace associated with
693    this error.</li>
694<li><em>No user database is available</em> - You have not configured a resource
695    reference for the <code>users</code> resource that points at an
696    appropriate user database instance.  Check your <code>manager.xml</code>
697    file and ensure that you have created an appropriate
698    <code>&lt;ResourceLink&gt;</code> or
699    <code>&lt;ResourceParams&gt;</code> element for this resource.</li>
700</ul>
701
702</blockquote></td></tr></table>
703
704
705<table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Session Statistics"><strong>Session Statistics</strong></a></font></td></tr><tr><td><blockquote>
706
707<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
708http://localhost:8080/manager/sessions?path=/examples
709</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
710
711<p>Display the default session timeout for a web application, and the
712number of currently active sessions that fall within ten-minute ranges of
713their actual timeout times.  For example, after restarting Tomcat and then
714executing one of the JSP samples in the <code>/examples</code> web app,
715you might get something like this:</p>
716<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
717OK - Session information for application at context path /examples
718Default maximum session inactive interval 30 minutes
71930 - &lt;40 minutes:1 sessions
720</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
721
722</blockquote></td></tr></table>
723
724
725<table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Start an Existing Application"><strong>Start an Existing Application</strong></a></font></td></tr><tr><td><blockquote>
726
727<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
728http://localhost:8080/manager/start?path=/examples
729</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
730
731<p>Signal a stopped application to restart, and make itself available again.
732Stopping and starting is useful, for example, if the database required by
733your application becomes temporarily unavailable.  It is usually better to
734stop the web application that relies on this database rather than letting
735users continuously encounter database exceptions.</p>
736
737<p>If this command succeeds, you will see a response like this:</p>
738<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
739OK - Started application at context path /examples
740</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
741
742<p>Otherwise, the response will start with <code>FAIL</code> and include an
743error message.  Possible causes for problems include:</p>
744<ul>
745<li><em>Encountered exception</em>
746    <blockquote>
747    <p>An exception was encountered trying to start the web application.
748    Check the Tomcat 6 logs for the details.</p>
749    </blockquote></li>
750<li><em>Invalid context path was specified</em>
751    <blockquote>
752    <p>The context path must start with a slash character. To reference the
753    ROOT web application use "/".</p>
754    </blockquote></li>
755<li><em>No context exists for path /foo</em>
756    <blockquote>
757    <p>There is no deployed application on the context path
758    that you specified.</p>
759    </blockquote></li>
760<li><em>No context path was specified</em>
761    <blockquote>
762    The <code>path</code> parameter is required.
763    </blockquote></li>
764</ul>
765
766</blockquote></td></tr></table>
767
768<table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Stop an Existing Application"><strong>Stop an Existing Application</strong></a></font></td></tr><tr><td><blockquote>
769
770<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
771http://localhost:8080/manager/stop?path=/examples
772</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
773
774<p>Signal an existing application to make itself unavailable, but leave it
775deployed.  Any request that comes in while an application is
776stopped will see an HTTP error 404, and this application will show as
777"stopped" on a list applications command.</p>
778
779<p>If this command succeeds, you will see a response like this:</p>
780<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
781OK - Stopped application at context path /examples
782</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
783
784<p>Otherwise, the response will start with <code>FAIL</code> and include an
785error message.  Possible causes for problems include:</p>
786<ul>
787<li><em>Encountered exception</em>
788    <blockquote>
789    <p>An exception was encountered trying to stop the web application.
790    Check the Tomcat 6 logs for the details.</p>
791    </blockquote></li>
792<li><em>Invalid context path was specified</em>
793    <blockquote>
794    <p>The context path must start with a slash character. To reference the
795    ROOT web application use "/".</p>
796    </blockquote></li>
797<li><em>No context exists for path /foo</em>
798    <blockquote>
799    <p>There is no deployed application on the context path
800    that you specified.</p>
801    </blockquote></li>
802<li><em>No context path was specified</em>
803    <blockquote>
804    The <code>path</code> parameter is required.
805    </blockquote></li>
806</ul>
807
808</blockquote></td></tr></table>
809
810
811<table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Undeploy an Existing Application"><strong>Undeploy an Existing Application</strong></a></font></td></tr><tr><td><blockquote>
812
813<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
814http://localhost:8080/manager/undeploy?path=/examples
815</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
816
817<p><strong><font color="red">WARNING</font> - This command will delete any web
818application artifacts that exist within <code>appBase</code> directory
819(typically "webapps") for this virtual host</strong>.
820This will delete the the application .WAR, if present,
821the application directory resulting either from a deploy in unpacked form
822or from .WAR expansion as well as the XML Context definition from
823<code>$CATALINA_BASE/conf/[enginename]/[hostname]/</code> directory.
824If you simply want to take an application
825out of service, you should use the <code>/stop</code> command instead.</p>
826
827<p>Signal an existing application to gracefully shut itself down, and
828remove it from Tomcat (which also makes this context path available for
829reuse later).  In addition, the document root directory is removed, if it
830exists in the <code>appBase</code> directory (typically "webapps") for
831this virtual host.  This command is the logical opposite of the
832<code>/deploy</code> command.</p>
833
834<p>If this command succeeds, you will see a response like this:</p>
835<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
836OK - Undeployed application at context path /examples
837</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
838
839<p>Otherwise, the response will start with <code>FAIL</code> and include an
840error message.  Possible causes for problems include:</p>
841<ul>
842<li><em>Encountered exception</em>
843    <blockquote>
844    <p>An exception was encountered trying to undeploy the web application.
845    Check the Tomcat 6 logs for the details.</p>
846    </blockquote></li>
847<li><em>Invalid context path was specified</em>
848    <blockquote>
849    <p>The context path must start with a slash character. To reference the
850    ROOT web application use "/".</p>
851    </blockquote></li>
852<li><em>No context exists for path /foo</em>
853    <blockquote>
854    <p>There is no deployed application on the context path
855    that you specified.</p>
856    </blockquote></li>
857<li><em>No context path was specified</em>
858    <blockquote>
859    The <code>path</code> parameter is required.
860    </blockquote></li>
861</ul>
862
863</blockquote></td></tr></table>
864
865</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Executing Manager Commands With Ant"><strong>Executing Manager Commands With Ant</strong></a></font></td></tr><tr><td><blockquote>
866
867<p>In addition to the ability to execute Manager commands via HTTP requests,
868as documented above, Tomcat 6 includes a convenient set of Task definitions
869for the <em>Ant</em> (version 1.4 or later) build tool.  In order to use these
870commands, you must perform the following setup operations:</p>
871<ul>
872<li>Download the binary distribution of Ant from
873    <a href="http://ant.apache.org">http://ant.apache.org</a>.
874    You must use version <strong>1.4</strong> or later.</li>
875<li>Install the Ant distribution in a convenient directory (called
876    ANT_HOME in the remainder of these instructions).</li>
877<li>Copy the file <code>server/lib/catalina-ant.jar</code> from your Tomcat 6
878    installation into Ant's library directory (<code>$ANT_HOME/lib</code>).
879    </li>
880<li>Add the <code>$ANT_HOME/bin</code> directory to your <code>PATH</code>
881    environment variable.</li>
882<li>Configure at least one username/password combination in your Tomcat
883    user database that includes the <code>manager</code> role.</li>
884</ul>
885
886<p>To use custom tasks within Ant, you must declare them first with a
887<code>&lt;taskdef&gt;</code> element.  Therefore, your <code>build.xml</code>
888file might look something like this:</p>
889
890<table border="1">
891<tr><td><pre>
892&lt;project name="My Application" default="compile" basedir="."&gt;
893
894  &lt;!-- Configure the directory into which the web application is built --&gt;
895  &lt;property name="build"    value="${basedir}/build"/&gt;
896
897  &lt;!-- Configure the context path for this application --&gt;
898  &lt;property name="path"     value="/myapp"/&gt;
899
900  &lt;!-- Configure properties to access the Manager application --&gt;
901  &lt;property name="url"      value="http://localhost:8080/manager"/&gt;
902  &lt;property name="username" value="myusername"/&gt;
903  &lt;property name="password" value="mypassword"/&gt;
904
905  &lt;!-- Configure the custom Ant tasks for the Manager application --&gt;
906  &lt;taskdef name="deploy"    classname="org.apache.catalina.ant.DeployTask"/&gt;
907  &lt;taskdef name="list"      classname="org.apache.catalina.ant.ListTask"/&gt;
908  &lt;taskdef name="reload"    classname="org.apache.catalina.ant.ReloadTask"/&gt;
909  &lt;taskdef name="resources" classname="org.apache.catalina.ant.ResourcesTask"/&gt;
910  &lt;taskdef name="roles"     classname="org.apache.catalina.ant.RolesTask"/&gt;
911  &lt;taskdef name="start"     classname="org.apache.catalina.ant.StartTask"/&gt;
912  &lt;taskdef name="stop"      classname="org.apache.catalina.ant.StopTask"/&gt;
913  &lt;taskdef name="undeploy"  classname="org.apache.catalina.ant.UndeployTask"/&gt;
914
915  &lt;!-- Executable Targets --&gt;
916  &lt;target name="compile" description="Compile web application"&gt;
917    &lt;!-- ... construct web application in ${build} subdirectory, and
918            generated a ${path}.war ... --&gt;
919  &lt;/target&gt;
920
921  &lt;target name="deploy" description="Install web application"
922          depends="compile"&gt;
923    &lt;deploy url="${url}" username="${username}" password="${password}"
924            path="${path}" war="file:${build}${path}.war"/&gt;
925  &lt;/target&gt;
926
927  &lt;target name="reload" description="Reload web application"
928          depends="compile"&gt;
929    &lt;reload  url="${url}" username="${username}" password="${password}"
930            path="${path}"/&gt;
931  &lt;/target&gt;
932
933  &lt;target name="undeploy" description="Remove web application"&gt;
934    &lt;undeploy url="${url}" username="${username}" password="${password}"
935            path="${path}"/&gt;
936  &lt;/target&gt;
937
938&lt;/project&gt;
939</pre></td></tr>
940</table>
941
942<p>Now, you can execute commands like <code>ant deploy</code> to deploy the
943application to a running instance of Tomcat, or <code>ant reload</code> to
944tell Tomcat to reload it.  Note also that most of the interesting values in
945this <code>build.xml</code> file are defined as replaceable properties, so
946you can override their values from the command line.  For example, you might
947consider it a security risk to include the real manager password in your
948<code>build.xml</code> file's source code.  To avoid this, omit the password
949property, and specify it from the command line:</p>
950<pre>
951  ant -Dpassword=secret deploy
952</pre>
953
954<table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Tasks output capture"><strong>Tasks output capture</strong></a></font></td></tr><tr><td><blockquote>
955
956<p>Using <em>Ant</em> version <strong>1.6.2</strong> or later,
957the Catalina tasks offer the option to capture their output in
958properties or external files. They support directly the following subset of the
959<code>&lt;redirector&gt;</code> type attributes:
960</p>
961
962<table border="1" cellpadding="2" cellspacing="0">
963<tbody>
964<tr>
965<td valign="top"><b>Attribute</b></td>
966<td valign="top"><b>Description</b></td>
967<td align="center" valign="top"><b>Required</b></td>
968</tr>
969<tr>
970<td valign="top">output</td>
971<td valign="top">Name of a file to which to write the output. If
972the error stream is not also redirected to a file or property, it will
973appear in this output.</td>
974<td align="center" valign="top">No</td>
975</tr>
976<tr>
977<td valign="top">error</td>
978<td valign="top">The file to which the standard error of the
979command should be redirected.</td>
980<td align="center" valign="top">No</td>
981</tr>
982<tr>
983<td valign="top">logError</td>
984<td valign="top">This attribute is used when you wish to see
985error output in Ant's log and you are redirecting output to a
986file/property. The error output will not be included in the output
987file/property. If you redirect error with the <i>error</i> or <i>errorProperty</i>
988attributes, this will have no effect.</td>
989<td align="center" valign="top">No</td>
990</tr>
991<tr>
992<td valign="top">append</td>
993<td valign="top">Whether output and error files should be
994appended to or overwritten. Defaults to <code>false</code>.</td>
995<td align="center" valign="top">No</td>
996</tr>
997<tr>
998<td valign="top">createemptyfiles</td>
999<td valign="top">Whether output and error files should be created
1000even when empty. Defaults to <code>true</code>.</td>
1001<td align="center" valign="top">No</td>
1002</tr>
1003<tr>
1004<td valign="top">outputproperty</td>
1005<td valign="top">The name of a property in which the output of
1006the command should be stored. Unless the error stream is redirected to
1007a separate file or stream, this property will include the error output.</td>
1008<td align="center" valign="top">No</td>
1009</tr>
1010<tr>
1011<td valign="top">errorproperty</td>
1012<td valign="top">The name of a property in which the standard
1013error of the command should be stored.</td>
1014<td align="center" valign="top">No</td>
1015</tr>
1016</tbody>
1017</table>
1018
1019<p>A couple of additional attributes can also be specified:
1020</p>
1021<table border="1" cellpadding="2" cellspacing="0">
1022<tbody>
1023<tr>
1024<td valign="top"><b>Attribute</b></td>
1025<td valign="top"><b>Description</b></td>
1026<td align="center" valign="top"><b>Required</b></td>
1027</tr>
1028<tr>
1029<td valign="top">alwaysLog</td>
1030<td valign="top">This attribute is used when you wish to see the
1031output you are capturing, appearing also in the Ant's log. It must not be
1032used unless you are capturing task output.
1033Defaults to <code>false</code>.
1034<em>This attribute will be supported directly by <code>&lt;redirector&gt;</code>
1035in Ant 1.6.3</em></td>
1036<td align="center" valign="top">No</td>
1037</tr>
1038<tr>
1039<td valign="top">failonerror</td>
1040<td valign="top">This attribute is used when you wish to avoid that
1041any manager command processing error terminates the ant execution. Defaults to <code>true</code>.
1042It must be set to <code>false</code>, if you want to capture error output,
1043otherwise execution will terminate before anything can be captured.
1044<br>
1045This attribute acts only on manager command execution,
1046any wrong or missing command attribute will still cause Ant execution termination.
1047</td>
1048<td align="center" valign="top">No</td>
1049</tr>
1050</tbody>
1051</table>
1052
1053<p>They also support the embedded <code>&lt;redirector&gt;</code> element
1054in which you can specify
1055its full set of attributes, but <code>input</code>, <code>inputstring</code> and
1056<code>inputencoding</code> that, even if accepted, are not used because they have
1057no meaning in this context.
1058Refer to <a href="http://ant.apache.org">ant manual</a> for details on
1059<code>&lt;redirector&gt;</code> element attributes.
1060</p>
1061
1062<p>
1063Here is a sample build file extract that shows how this output redirection support
1064can be used:
1065</p>
1066
1067<table border="1">
1068<tr><td><pre>
1069  &lt;target name="manager.deploy"
1070    depends="context.status"
1071    if="context.notInstalled"&gt;
1072    &lt;deploy url="${mgr.url}"
1073      username="${mgr.username}"
1074      password="${mgr.password}"
1075      path="${mgr.context.path}"
1076      config="${mgr.context.descriptor}"/&gt;
1077  &lt;/target&gt;
1078
1079  &lt;target name="manager.deploy.war"
1080    depends="context.status"
1081    if="context.deployable"&gt;
1082    &lt;deploy url="${mgr.url}"
1083      username="${mgr.username}"
1084      password="${mgr.password}"
1085      update="${mgr.update}"
1086      path="${mgr.context.path}"
1087      war="${mgr.war.file}"/&gt;
1088  &lt;/target&gt;
1089 
1090  &lt;target name="context.status"&gt;
1091    &lt;property name="running" value="${mgr.context.path}:running"/&gt;
1092    &lt;property name="stopped" value="${mgr.context.path}:stopped"/&gt;
1093 
1094    &lt;list url="${mgr.url}"
1095      outputproperty="ctx.status"
1096      username="${mgr.username}"
1097      password="${mgr.password}"&gt;
1098    &lt;/list&gt;
1099   
1100    &lt;condition property="context.running"&gt;
1101      &lt;contains string="${ctx.status}" substring="${running}"/&gt;
1102    &lt;/condition&gt;
1103    &lt;condition property="context.stopped"&gt;
1104      &lt;contains string="${ctx.status}" substring="${stopped}"/&gt;
1105    &lt;/condition&gt;
1106    &lt;condition property="context.notInstalled"&gt;
1107      &lt;and&gt;
1108        &lt;isfalse value="${context.running}"/&gt;
1109        &lt;isfalse value="${context.stopped}"/&gt;
1110      &lt;/and&gt;
1111    &lt;/condition&gt;
1112    &lt;condition property="context.deployable"&gt;
1113      &lt;or&gt;
1114        &lt;istrue value="${context.notInstalled}"/&gt;
1115        &lt;and&gt;
1116          &lt;istrue value="${context.running}"/&gt;
1117          &lt;istrue value="${mgr.update}"/&gt;
1118        &lt;/and&gt;
1119        &lt;and&gt;
1120          &lt;istrue value="${context.stopped}"/&gt;
1121          &lt;istrue value="${mgr.update}"/&gt;
1122        &lt;/and&gt;
1123      &lt;/or&gt;
1124    &lt;/condition&gt;
1125    &lt;condition property="context.undeployable"&gt;
1126      &lt;or&gt;
1127        &lt;istrue value="${context.running}"/&gt;
1128        &lt;istrue value="${context.stopped}"/&gt;
1129      &lt;/or&gt;
1130    &lt;/condition&gt;
1131  &lt;/target&gt;
1132</pre></td></tr>
1133</table>
1134
1135<p><strong>WARNING:</strong> even if it doesn't make many sense, and is always a bad idea,
1136calling a Catalina task more than once,
1137badly set Ant tasks depends chains may cause that a task be called
1138more than once in the same Ant run, even if not intended to. A bit of caution should be exercised when you are
1139capturing output from that task, because this could lead to something unexpected:
1140<ul>
1141<li>when capturing in a property you will find in it only the output from the <em>first</em> call, because
1142Ant properties are immutable and once set they cannot be changed,
1143</li>
1144<li>when capturing in a file, each run will overwrite it and you will find in it only the <em>last</em> call
1145output, unless you are using the <code>append="true"</code> attribute, in which case you will
1146see the output of each task call appended to the file.
1147</li>
1148</ul>
1149</p>
1150
1151</blockquote></td></tr></table>
1152
1153</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Using the JMX Proxy Servlet"><strong>Using the JMX Proxy Servlet</strong></a></font></td></tr><tr><td><blockquote>
1154
1155  <table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="What is JMX Proxy Servlet"><strong>What is JMX Proxy Servlet</strong></a></font></td></tr><tr><td><blockquote>
1156    The JMX Proxy Servlet is a lightweight proxy to get and set the
1157    tomcat internals. (Or any class that has been exposed via an MBean)
1158    Its usage is not very user friendly but the UI is
1159    extremely help for integrating command line scripts for monitoring
1160    and changing the internals of tomcat. You can do two things with the proxy:
1161    get information and set information. For you to really understand the
1162    JMX Proxy Servlet, you should have a general understanding of JMX.
1163    If you don't know what JMX is, then prepare to be confused.
1164  </blockquote></td></tr></table>
1165
1166  <table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="JMX Query command"><strong>JMX Query command</strong></a></font></td></tr><tr><td><blockquote>
1167    This takes the form:
1168<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
1169http://webserver/manager/jmxproxy/?qry=STUFF
1170</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
1171    Where <code>STUFF</code> is the JMX query you wish to perform. For example,
1172    here are some queries you might wish to run:
1173    <ul>
1174      <li>
1175        <code>qry=*%3Atype%3DRequestProcessor%2C* --&gt;
1176         type=RequestProcessor</code> which will locate all
1177         workers which can process requests and report
1178         their state.
1179      </li>
1180      <li>
1181        <code>qry=*%3Aj2eeType=Servlet%2c* --&gt;
1182            j2eeType=Servlet</code> which return all loaded servlets.
1183      </li>
1184      <li>
1185        <code>qry=Catalina%3Atype%3DEnvironment%2Cresourcetype%3DGlobal%2Cname%3DsimpleValue --&gt;
1186            Catalina:type=Environment,resourcetype=Global,name=simpleValue</code>
1187            which look for a specific MBean by the given name.
1188      </li>
1189    </ul>
1190    You'll need to experiment with this to really understand its capabilites.
1191    If you provide no <code>qry</code> parameter, then all of the MBeans will
1192    be displayed. We really recommend looking at the tomcat source code and
1193    understand the JMX spec to get a better understanding of all the queries
1194    you may run.
1195  </blockquote></td></tr></table>
1196
1197  <table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="JMX Set command"><strong>JMX Set command</strong></a></font></td></tr><tr><td><blockquote>
1198    Now that you can query an MBean, its time to muck with Tomcat's internals!
1199    The general form of the set command is :
1200<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
1201http://webserver/manager/jmxproxy/?set=BEANNAME&amp;att=MYATTRIBUTE&amp;val=NEWVALUE
1202</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
1203    So you need to provide 3 request parameters:
1204    <ol>
1205      <li><code>set</code>: The full bean name</li>
1206      <li><code>att</code>: The attribute you wish to alter</li>
1207      <li><code>val</code>: The new value </li>
1208    </ol>
1209    If all goes ok, then it will say OK, otherwise an error message will be
1210    shown. For example, lets say we wish to turn up debugging on the fly for the
1211    <code>ErrorReportValve</code>. The following will set debugging to 10.
1212<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
1213http://localhost:8080/manager/jmxproxy/
1214?set=Catalina%3Atype%3DValve%2Cname%3DErrorReportValve%2Chost%3Dlocalhost&amp;att=debug&amp;val=10
1215</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
1216    and my result is (YMMV):
1217<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
1218Result: ok
1219</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
1220
1221    Here is what I see if I pass in a bad value. Here is the URL I used,
1222    I try set debugging equal to 'cowbell':
1223<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
1224http://localhost:8080/manager/jmxproxy/
1225?set=Catalina%3Atype%3DValve%2Cname%3DErrorReportValve%2Chost%3Dlocalhost&amp;att=debug&amp;val=cowbell
1226</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
1227    When I try that, my result is
1228<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
1229Error: java.lang.NumberFormatException: For input string: "cowbell"
1230</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./images/void.gif"></td></tr></table></div>
1231  </blockquote></td></tr></table>
1232
1233
1234</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font size="-1" color="#525D76"><em>
1235        Copyright &copy; 1999-2008, Apache Software Foundation
1236        </em></font></div></td></tr></table></body></html>
Note: See TracBrowser for help on using the repository browser.