刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 1 | <html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Apache Tomcat 7 (7.0.77) - Tomcat Web Application Manager How To</title><meta name="author" content="Glenn L. Nielsen"><style type="text/css" media="print">
|
| 2 | .noPrint {display: none;}
|
| 3 | td#mainBody {width: 100%;}
|
| 4 | </style><style type="text/css">
|
| 5 | code {background-color:rgb(224,255,255);padding:0 0.1em;}
|
| 6 | code.attributeName, code.propertyName {background-color:transparent;}
|
| 7 |
|
| 8 |
|
| 9 | table {
|
| 10 | border-collapse: collapse;
|
| 11 | text-align: left;
|
| 12 | }
|
| 13 | table *:not(table) {
|
| 14 | /* Prevent border-collapsing for table child elements like <div> */
|
| 15 | border-collapse: separate;
|
| 16 | }
|
| 17 |
|
| 18 | th {
|
| 19 | text-align: left;
|
| 20 | }
|
| 21 |
|
| 22 |
|
| 23 | div.codeBox pre code, code.attributeName, code.propertyName, code.noHighlight, .noHighlight code {
|
| 24 | background-color: transparent;
|
| 25 | }
|
| 26 | div.codeBox {
|
| 27 | overflow: auto;
|
| 28 | margin: 1em 0;
|
| 29 | }
|
| 30 | div.codeBox pre {
|
| 31 | margin: 0;
|
| 32 | padding: 4px;
|
| 33 | border: 1px solid #999;
|
| 34 | border-radius: 5px;
|
| 35 | background-color: #eff8ff;
|
| 36 | display: table; /* To prevent <pre>s from taking the complete available width. */
|
| 37 | /*
|
| 38 | When it is officially supported, use the following CSS instead of display: table
|
| 39 | to prevent big <pre>s from exceeding the browser window:
|
| 40 | max-width: available;
|
| 41 | width: min-content;
|
| 42 | */
|
| 43 | }
|
| 44 |
|
| 45 | div.codeBox pre.wrap {
|
| 46 | white-space: pre-wrap;
|
| 47 | }
|
| 48 |
|
| 49 |
|
| 50 | table.defaultTable tr, table.detail-table tr {
|
| 51 | border: 1px solid #CCC;
|
| 52 | }
|
| 53 |
|
| 54 | table.defaultTable tr:nth-child(even), table.detail-table tr:nth-child(even) {
|
| 55 | background-color: #FAFBFF;
|
| 56 | }
|
| 57 |
|
| 58 | table.defaultTable tr:nth-child(odd), table.detail-table tr:nth-child(odd) {
|
| 59 | background-color: #EEEFFF;
|
| 60 | }
|
| 61 |
|
| 62 | table.defaultTable th, table.detail-table th {
|
| 63 | background-color: #88b;
|
| 64 | color: #fff;
|
| 65 | }
|
| 66 |
|
| 67 | table.defaultTable th, table.defaultTable td, table.detail-table th, table.detail-table td {
|
| 68 | padding: 5px 8px;
|
| 69 | }
|
| 70 |
|
| 71 |
|
| 72 | p.notice {
|
| 73 | border: 1px solid rgb(255, 0, 0);
|
| 74 | background-color: rgb(238, 238, 238);
|
| 75 | color: rgb(0, 51, 102);
|
| 76 | padding: 0.5em;
|
| 77 | margin: 1em 2em 1em 1em;
|
| 78 | }
|
| 79 | </style></head><body bgcolor="#ffffff" text="#000000" link="#525D76" alink="#525D76" vlink="#525D76"><table border="0" width="100%" cellspacing="0"><!--PAGE HEADER--><tr><td><!--PROJECT LOGO--><a href="http://tomcat.apache.org/"><img src="./images/tomcat.gif" align="right" alt="
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 80 | The Apache Tomcat Servlet/JSP Container
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 81 | " border="0"></a></td><td><h1><font face="arial,helvetica,sanserif">Apache Tomcat 7</font></h1><font face="arial,helvetica,sanserif">Version 7.0.77, Mar 28 2017</font></td><td><!--APACHE LOGO--><a href="http://www.apache.org/"><img src="./images/asf-logo.svg" align="right" alt="Apache Logo" border="0" style="width: 266px;height: 83px;"></a></td></tr></table><table border="0" width="100%" cellspacing="4"><!--HEADER SEPARATOR--><tr><td colspan="2"><hr noshade size="1"></td></tr><tr><!--LEFT SIDE NAVIGATION--><td width="20%" valign="top" nowrap class="noPrint"><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><li><a href="#comments_section">User Comments</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/TLS</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-descriptors-howto.html">16) MBeans Descriptors</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><li><a href="security-howto.html">28) Security Considerations</a></li><li><a href="windows-service-howto.html">29) Windows Service</a></li><li><a href="windows-auth-howto.html">30) Windows Authentication</a></li><li><a href="jdbc-pool.html">31) Tomcat's JDBC Pool</a></li><li><a href="web-socket-howto.html">32) WebSocket</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">Tomcat Javadocs</a></li><li><a href="servletapi/index.html">Servlet Javadocs</a></li><li><a href="jspapi/index.html">JSP 2.2 Javadocs</a></li><li><a href="elapi/index.html">EL 2.2 Javadocs</a></li><li><a href="websocketapi/index.html">WebSocket 1.1 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><li><a href="tribes/introduction.html">Tribes</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td width="80%" valign="top" align="left" id="mainBody"><h1>Tomcat Web Application Manager How To</h1><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Table of Contents"><!--()--></a><a name="Table_of_Contents"><strong>Table of Contents</strong></a></font></td></tr><tr><td><blockquote>
|
| 82 | <ul><li><a href="#Introduction">Introduction</a></li><li><a href="#Message">Message</a></li><li><a href="#Manager">Manager</a></li><li><a href="#Applications">Applications</a><ol><li><a href="#Start">Start</a></li><li><a href="#Stop">Stop</a></li><li><a href="#Reload">Reload</a></li><li><a href="#Undeploy">Undeploy</a></li></ol></li><li><a href="#Deploy">Deploy</a><ol><li><a href="#Deploy_directory_or_WAR_file_located_on_server">Deploy directory or WAR file located on server</a><ol><li><a href="#Deploy_a_Directory_or_WAR_by_URL">Deploy a Directory or WAR by URL</a></li><li><a href="#Deploy_a_Directory_or_War_from_the_Host_appBase">Deploy a Directory or War from the Host appBase</a></li><li><a href="#Deploy_using_a_Context_configuration_%22.xml%22_file">Deploy using a Context configuration ".xml" file</a></li></ol></li><li><a href="#Upload_a_WAR_file_to_install">Upload a WAR file to install</a></li><li><a href="#Deployment_Notes">Deployment Notes</a></li><li><a href="#Deploy_Message">Deploy Message</a></li></ol></li><li><a href="#Diagnostics">Diagnostics</a><ol><li><a href="#Finding_memory_leaks">Finding memory leaks</a></li></ol></li><li><a href="#Server_Information">Server Information</a></li></ul>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 83 | </blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Introduction"><strong>Introduction</strong></a></font></td></tr><tr><td><blockquote>
|
| 84 |
|
| 85 | <p>In many production environments it is very useful to have the capability
|
| 86 | to manage your web applications without having to shut down and restart
|
| 87 | Tomcat. This document is for the HTML web interface to the web application
|
| 88 | <a href="manager-howto.html">manager</a>.</p>
|
| 89 |
|
| 90 | <p>The interface is divided into six sections:</p>
|
| 91 | <ul>
|
| 92 | <li><strong>Message</strong> - Displays success and failure messages.</li>
|
| 93 | <li><strong>Manager</strong> - General manager operations like list and
|
| 94 | help.</li>
|
| 95 | <li><strong>Applications</strong> - List of web applications and
|
| 96 | commands.</li>
|
| 97 | <li><strong>Deploy</strong> - Deploying web applications.</li>
|
| 98 | <li><strong>Diagnostics</strong> - Identifying potential problems.</li>
|
| 99 | <li><strong>Server Information</strong> - Information about the Tomcat
|
| 100 | server.</li>
|
| 101 | </ul>
|
| 102 |
|
| 103 | </blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Message"><strong>Message</strong></a></font></td></tr><tr><td><blockquote>
|
| 104 |
|
| 105 | <p>
|
| 106 | Displays information about the success or failure of the last web application
|
| 107 | manager command you performed. If it succeeded <strong>OK</strong> is displayed
|
| 108 | and may be followed by a success message. If it failed <strong>FAIL</strong>
|
| 109 | is displayed followed by an error message. Common failure messages are
|
| 110 | documented below for each command. The complete list of failure messages for
|
| 111 | each command can be found in the <a href="manager-howto.html">manager</a> web
|
| 112 | application documentation.
|
| 113 | </p>
|
| 114 |
|
| 115 | </blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Manager"><strong>Manager</strong></a></font></td></tr><tr><td><blockquote>
|
| 116 |
|
| 117 | <p>The Manager section has three links:</p>
|
| 118 | <ul>
|
| 119 | <li><strong>List Applications</strong> - Redisplay a list of web
|
| 120 | applications.</li>
|
| 121 | <li><strong>HTML Manager Help</strong> - A link to this document.</li>
|
| 122 | <li><strong>Manager Help</strong> - A link to the comprehensive Manager
|
| 123 | App HOW TO.</li>
|
| 124 | </ul>
|
| 125 |
|
| 126 | </blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Applications"><strong>Applications</strong></a></font></td></tr><tr><td><blockquote>
|
| 127 |
|
| 128 | <p>The Applications section lists information about all the installed web
|
| 129 | applications and provides links for managing them. For each web application
|
| 130 | the following is displayed:</p>
|
| 131 | <ul>
|
| 132 | <li><strong>Path</strong> - The web application context path.</li>
|
| 133 | <li><strong>Display Name</strong> - The display name for the web application
|
| 134 | if it has one configured in its "web.xml" file.</li>
|
| 135 | <li><strong>Running</strong> - Whether the web application is running and
|
| 136 | available (true), or not running and unavailable (false).</li>
|
| 137 | <li><strong>Sessions</strong> - The number of active sessions for remote
|
| 138 | users of this web application. The number of sessions is a link which
|
| 139 | when submitted displays more details about session usage by the web
|
| 140 | application in the Message box.</li>
|
| 141 | <li><strong>Commands</strong> - Lists all commands which can be performed on
|
| 142 | the web application. Only those commands which can be performed will be
|
| 143 | listed as a link which can be submitted. No commands can be performed on
|
| 144 | the manager web application itself. The following commands can be
|
| 145 | performed:
|
| 146 | <ul>
|
| 147 | <li><strong>Start</strong> - Start a web application which had been
|
| 148 | stopped.</li>
|
| 149 | <li><strong>Stop</strong> - Stop a web application which is currently
|
| 150 | running and make it unavailable.</li>
|
| 151 | <li><strong>Reload</strong> - Reload the web application so that new
|
| 152 | ".jar" files in <code>/WEB-INF/lib/</code> or new classes in
|
| 153 | <code>/WEB-INF/classes/</code> can be used.</li>
|
| 154 | <li><strong>Undeploy</strong> - Stop and then remove this web
|
| 155 | application from the server.</li>
|
| 156 | </ul>
|
| 157 | </li>
|
| 158 | </ul>
|
| 159 |
|
| 160 | <table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Start"><strong>Start</strong></a></font></td></tr><tr><td><blockquote>
|
| 161 |
|
| 162 | <p>Signal a stopped application to restart, and make itself available again.
|
| 163 | Stopping and starting is useful, for example, if the database required by
|
| 164 | your application becomes temporarily unavailable. It is usually better to
|
| 165 | stop the web application that relies on this database rather than letting
|
| 166 | users continuously encounter database exceptions.</p>
|
| 167 |
|
| 168 | <p>If this command succeeds, you will see a Message like this:</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 169 | <div class="codeBox"><pre><code>OK - Started application at context path /examples</code></pre></div>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 170 |
|
| 171 | <p>Otherwise, the Message will start with <code>FAIL</code> and include an
|
| 172 | error message. Possible causes for problems include:</p>
|
| 173 | <ul>
|
| 174 | <li><em>Encountered exception</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 175 | <p>An exception was encountered trying to start the web application.
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 176 | Check the Tomcat logs for the details.</p>
|
| 177 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 178 | <li><em>Invalid context path was specified</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 179 | <p>The context path must start with a slash character, unless you are
|
| 180 | referencing the ROOT web application -- in which case the context path
|
| 181 | must be a zero-length string.</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 182 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 183 | <li><em>No context exists for path /foo</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 184 | <p>There is no deployed application on the context path
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 185 | that you specified.</p>
|
| 186 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 187 | <li><em>No context path was specified</em>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 188 | <p>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 189 | The <code>path</code> parameter is required.
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 190 | </p>
|
| 191 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 192 | </ul>
|
| 193 |
|
| 194 | </blockquote></td></tr></table>
|
| 195 |
|
| 196 | <table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Stop"><strong>Stop</strong></a></font></td></tr><tr><td><blockquote>
|
| 197 |
|
| 198 | <p>Signal an existing application to make itself unavailable, but leave it
|
| 199 | deployed. Any request that comes in while an application is
|
| 200 | stopped will see an HTTP error 404, and this application will show as
|
| 201 | "stopped" on a list applications command.</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 202 |
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 203 | <p>If this command succeeds, you will see a Message like this:</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 204 | <div class="codeBox"><pre><code>OK - Stopped application at context path /examples</code></pre></div>
|
| 205 |
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 206 | <p>Otherwise, the Message will start with <code>FAIL</code> and include an
|
| 207 | error message. Possible causes for problems include:</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 208 | <ul>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 209 | <li><em>Encountered exception</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 210 | <p>An exception was encountered trying to stop the web application.
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 211 | Check the Tomcat logs for the details.</p>
|
| 212 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 213 | <li><em>Invalid context path was specified</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 214 | <p>The context path must start with a slash character, unless you are
|
| 215 | referencing the ROOT web application -- in which case the context path
|
| 216 | must be a zero-length string.</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 217 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 218 | <li><em>No context exists for path /foo</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 219 | <p>There is no deployed application on the context path
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 220 | that you specified.</p>
|
| 221 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 222 | <li><em>No context path was specified</em>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 223 | <p>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 224 | The <code>path</code> parameter is required.
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 225 | </p>
|
| 226 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 227 | </ul>
|
| 228 |
|
| 229 | </blockquote></td></tr></table>
|
| 230 |
|
| 231 | <table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Reload"><strong>Reload</strong></a></font></td></tr><tr><td><blockquote>
|
| 232 |
|
| 233 | <p>Signal an existing application to shut itself down and reload. This can
|
| 234 | be useful when the web application context is not reloadable and you have
|
| 235 | updated classes or property files in the <code>/WEB-INF/classes</code>
|
| 236 | directory or when you have added or updated jar files in the
|
| 237 | <code>/WEB-INF/lib</code> directory.
|
| 238 | </p>
|
| 239 | <p><strong>NOTE:</strong> The <code>/WEB-INF/web.xml</code>
|
| 240 | web application configuration file is not checked on a reload;
|
| 241 | the previous web.xml configuration is used.
|
| 242 | If you have made changes to your web.xml file you must stop
|
| 243 | then start the web application.
|
| 244 | </p>
|
| 245 |
|
| 246 | <p>If this command succeeds, you will see a Message like this:</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 247 | <div class="codeBox"><pre><code>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 248 | OK - Reloaded application at context path /examples
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 249 | </code></pre></div>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 250 |
|
| 251 | <p>Otherwise, the Message will start with <code>FAIL</code> and include an
|
| 252 | error message. Possible causes for problems include:</p>
|
| 253 | <ul>
|
| 254 | <li><em>Encountered exception</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 255 | <p>An exception was encountered trying to restart the web application.
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 256 | Check the Tomcat logs for the details.</p>
|
| 257 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 258 | <li><em>Invalid context path was specified</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 259 | <p>The context path must start with a slash character, unless you are
|
| 260 | referencing the ROOT web application -- in which case the context path
|
| 261 | must be a zero-length string.</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 262 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 263 | <li><em>No context exists for path /foo</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 264 | <p>There is no deployed application on the context path
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 265 | that you specified.</p>
|
| 266 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 267 | <li><em>No context path was specified</em>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 268 | <p>The <code>path</code> parameter is required.</p>
|
| 269 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 270 | <li><em>Reload not supported on WAR deployed at path /foo</em>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 271 | <p>Currently, application reloading (to pick up changes to the classes or
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 272 | <code>web.xml</code> file) is not supported when a web application is
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 273 | installed directly from a WAR file, which happens when the host is
|
| 274 | configured to not unpack WAR files. As it only works when the web
|
| 275 | application is installed from an unpacked directory, if you are using
|
| 276 | a WAR file, you should <code>undeploy</code> and then <code>deploy</code>
|
| 277 | the application again to pick up your changes.</p>
|
| 278 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 279 | </ul>
|
| 280 |
|
| 281 | </blockquote></td></tr></table>
|
| 282 |
|
| 283 | <table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Undeploy"><strong>Undeploy</strong></a></font></td></tr><tr><td><blockquote>
|
| 284 |
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 285 | <p><strong><span style="color: red;">WARNING</span> - This command will delete the
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 286 | contents of the web application directory and/or ".war" file if it exists within
|
| 287 | the <code>appBase</code> directory (typically "webapps") for this virtual host
|
| 288 | </strong>. The web application temporary work directory is also deleted. If
|
| 289 | you simply want to take an application out of service, you should use the
|
| 290 | <code>/stop</code> command instead.</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 291 |
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 292 | <p>Signal an existing application to gracefully shut itself down, and then
|
| 293 | remove it from Tomcat (which also makes this context path available for
|
| 294 | reuse later). This command is the logical opposite of the
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 295 | <code>/deploy</code> Ant command, and the related deploy features available
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 296 | in the HTML manager.</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 297 |
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 298 | <p>If this command succeeds, you will see a Message like this:</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 299 | <div class="codeBox"><pre><code>OK - Undeployed application at context path /examples</code></pre></div>
|
| 300 |
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 301 | <p>Otherwise, the Message will start with <code>FAIL</code> and include an
|
| 302 | error message. Possible causes for problems include:</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 303 | <ul>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 304 | <li><em>Encountered exception</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 305 | <p>An exception was encountered trying to undeploy the web application.
|
| 306 | Check the Tomcat logs for the details.</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 307 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 308 | <li><em>Invalid context path was specified</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 309 | <p>The context path must start with a slash character, unless you are
|
| 310 | referencing the ROOT web application -- in which case the context path
|
| 311 | must be a zero-length string.</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 312 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 313 | <li><em>No context exists for path /foo</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 314 | <p>There is no deployed application on the context path
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 315 | that you specified.</p>
|
| 316 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 317 | <li><em>No context path was specified</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 318 | The <code>path</code> parameter is required.
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 319 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 320 | </ul>
|
| 321 |
|
| 322 | </blockquote></td></tr></table>
|
| 323 |
|
| 324 | </blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Deploy"><strong>Deploy</strong></a></font></td></tr><tr><td><blockquote>
|
| 325 |
|
| 326 | <p>Web applications can be deployed using files or directories located
|
| 327 | on the Tomcat server or you can upload a web application archive (WAR)
|
| 328 | file to the server.</p>
|
| 329 |
|
| 330 | <p>To install an application, fill in the appropriate fields for the type
|
| 331 | of install you want to do and then submit it using the <i>Install</i>
|
| 332 | button.</p>
|
| 333 |
|
| 334 | <table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Deploy directory or WAR file located on server"><!--()--></a><a name="Deploy_directory_or_WAR_file_located_on_server"><strong>Deploy directory or WAR file located on server</strong></a></font></td></tr><tr><td><blockquote>
|
| 335 |
|
| 336 | <p>Deploy and start a new web application, attached to the specified <i>Context
|
| 337 | Path:</i> (which must not be in use by any other web application).
|
| 338 | This command is the logical opposite of the <em>Undeploy</em> command.</p>
|
| 339 |
|
| 340 | <p>There are a number of different ways the deploy command can be used.</p>
|
| 341 |
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 342 | <table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Deploy a Directory or WAR by URL"><!--()--></a><a name="Deploy_a_Directory_or_WAR_by_URL"><strong>Deploy a Directory or WAR by URL</strong></a></font></td></tr><tr><td><blockquote>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 343 |
|
| 344 | <p>Install a web application directory or ".war" file located on the Tomcat
|
| 345 | server. If no <i>Context Path</i> is specified, the directory name or the
|
| 346 | war file name without the ".war" extension is used as the path. The
|
| 347 | <i>WAR or Directory URL</i> specifies a URL (including the <code>file:</code>
|
| 348 | scheme) for either a directory or a web application archive (WAR) file. The
|
| 349 | supported syntax for a URL referring to a WAR file is described on the Javadocs
|
| 350 | page for the <code>java.net.JarURLConnection</code> class. Use only URLs that
|
| 351 | refer to the entire WAR file.</p>
|
| 352 |
|
| 353 | <p>In this example the web application located in the directory
|
| 354 | <code>C:\path\to\foo</code> on the Tomcat server (running on Windows)
|
| 355 | is deployed as the web application context named <code>/footoo</code>.</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 356 | <div class="codeBox"><pre><code>Context Path: /footoo
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 357 | WAR or Directory URL: file:C:/path/to/foo
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 358 | </code></pre></div>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 359 |
|
| 360 |
|
| 361 | <p>In this example the ".war" file <code>/path/to/bar.war</code> on the
|
| 362 | Tomcat server (running on Unix) is deployed as the web application
|
| 363 | context named <code>/bar</code>. Notice that there is no <code>path</code>
|
| 364 | parameter so the context path defaults to the name of the web application
|
| 365 | archive file without the ".war" extension.</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 366 | <div class="codeBox"><pre><code>WAR or Directory URL: jar:file:/path/to/bar.war!/</code></pre></div>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 367 |
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 368 | </blockquote></td></tr></table>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 369 |
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 370 | <table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Deploy a Directory or War from the Host appBase"><!--()--></a><a name="Deploy_a_Directory_or_War_from_the_Host_appBase"><strong>Deploy a Directory or War from the Host appBase</strong></a></font></td></tr><tr><td><blockquote>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 371 |
|
| 372 | <p>Install a web application directory or ".war" file located in your Host
|
| 373 | appBase directory. If no <i>Context Path</i> is specified the directory name
|
| 374 | or the war file name without the ".war" extension is used as the path.</p>
|
| 375 |
|
| 376 | <p>In this example the web application located in a subdirectory named
|
| 377 | <code>foo</code> in the Host appBase directory of the Tomcat server is
|
| 378 | deployed as the web application context named <code>/foo</code>. Notice
|
| 379 | that there is no <code>path</code> parameter so the context path defaults
|
| 380 | to the name of the web application directory.</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 381 | <div class="codeBox"><pre><code>WAR or Directory URL: foo</code></pre></div>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 382 |
|
| 383 |
|
| 384 | <p>In this example the ".war" file <code>bar.war</code> located in your
|
| 385 | Host appBase directory on the Tomcat server is deployed as the web
|
| 386 | application context named <code>/bartoo</code>.</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 387 | <div class="codeBox"><pre><code>Context Path: /bartoo
|
| 388 | WAR or Directory URL: bar.war</code></pre></div>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 389 |
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 390 | </blockquote></td></tr></table>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 391 |
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 392 | <table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Deploy using a Context configuration %22.xml%22 file"><!--()--></a><a name="Deploy_using_a_Context_configuration_%22.xml%22_file"><strong>Deploy using a Context configuration ".xml" file</strong></a></font></td></tr><tr><td><blockquote>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 393 |
|
| 394 | <p>If the Host deployXML flag is set to true, you can install a web
|
| 395 | application using a Context configuration ".xml" file and an optional
|
| 396 | ".war" file or web application directory. The <i>Context Path</i>
|
| 397 | is not used when installing a web application using a context ".xml"
|
| 398 | configuration file.</p>
|
| 399 |
|
| 400 | <p>A Context configuration ".xml" file can contain valid XML for a
|
| 401 | web application Context just as if it were configured in your
|
| 402 | Tomcat <code>server.xml</code> configuration file. Here is an
|
| 403 | example for Tomcat running on Windows:</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 404 | <div class="codeBox"><pre><code><Context path="/foobar" docBase="C:\path\to\application\foobar">
|
| 405 | </Context></code></pre></div>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 406 |
|
| 407 |
|
| 408 | <p>Use of the <i>WAR or Directory URL</i> is optional. When used
|
| 409 | to select a web application ".war" file or directory it overrides any
|
| 410 | docBase configured in the context configuration ".xml" file.</p>
|
| 411 |
|
| 412 | <p>Here is an example of installing an application using a Context
|
| 413 | configuration ".xml" file for Tomcat running on Windows.</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 414 | <div class="codeBox"><pre><code>XML Configuration file URL: file:C:/path/to/context.xml</code></pre></div>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 415 |
|
| 416 |
|
| 417 | <p>Here is an example of installing an application using a Context
|
| 418 | configuration ".xml" file and a web application ".war" file located
|
| 419 | on the server (Tomcat running on Unix).</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 420 | <div class="codeBox"><pre><code>XML Configuration file URL: file:/path/to/context.xml
|
| 421 | WAR or Directory URL: jar:file:/path/to/bar.war!/</code></pre></div>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 422 |
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 423 | </blockquote></td></tr></table>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 424 | </blockquote></td></tr></table>
|
| 425 |
|
| 426 | <table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Upload a WAR file to install"><!--()--></a><a name="Upload_a_WAR_file_to_install"><strong>Upload a WAR file to install</strong></a></font></td></tr><tr><td><blockquote>
|
| 427 |
|
| 428 | <p>Upload a WAR file from your local system and install it into the
|
| 429 | appBase for your Host. The name of the WAR file without the ".war"
|
| 430 | extension is used as the context path name.</p>
|
| 431 |
|
| 432 | <p>Use the <i>Browse</i> button to select a WAR file to upload to the
|
| 433 | server from your local desktop system.</p>
|
| 434 |
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 435 | <p>The .WAR file may include Tomcat specific deployment configuration, by
|
| 436 | including a Context configuration XML file in
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 437 | <code>/META-INF/context.xml</code>.</p>
|
| 438 |
|
| 439 | <p>Upload of a WAR file could fail for the following reasons:</p>
|
| 440 | <ul>
|
| 441 | <li><em>File uploaded must be a .war</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 442 | <p>The upload install will only accept files which have the filename
|
| 443 | extension of ".war".</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 444 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 445 | <li><em>War file already exists on server</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 446 | <p>If a war file of the same name already exists in your Host's
|
| 447 | appBase the upload will fail. Either undeploy the existing war file
|
| 448 | from your Host's appBase or upload the new war file using a different
|
| 449 | name.</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 450 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 451 | <li><em>File upload failed, no file</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 452 | <p>The file upload failed, no file was received by the server.</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 453 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 454 | <li><em>Install Upload Failed, Exception:</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 455 | <p>The war file upload or install failed with a Java Exception.
|
| 456 | The exception message will be listed.</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 457 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 458 | </ul>
|
| 459 |
|
| 460 | </blockquote></td></tr></table>
|
| 461 |
|
| 462 | <table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Deployment Notes"><!--()--></a><a name="Deployment_Notes"><strong>Deployment Notes</strong></a></font></td></tr><tr><td><blockquote>
|
| 463 |
|
| 464 | <p>If the Host is configured with unpackWARs=true and you install a war
|
| 465 | file, the war will be unpacked into a directory in your Host appBase
|
| 466 | directory.</p>
|
| 467 |
|
| 468 | <p>If the application war or directory is deployed in your Host appBase
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 469 | directory and either the Host is configured with autoDeploy=true the Context
|
| 470 | path must match the directory name or war file name without the ".war"
|
| 471 | extension.</p>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 472 |
|
| 473 | <p>For security when untrusted users can manage web applications, the
|
| 474 | Host deployXML flag can be set to false. This prevents untrusted users
|
| 475 | from installing web applications using a configuration XML file and
|
| 476 | also prevents them from installing application directories or ".war"
|
| 477 | files located outside of their Host appBase.</p>
|
| 478 |
|
| 479 | </blockquote></td></tr></table>
|
| 480 |
|
| 481 | <table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Deploy Message"><!--()--></a><a name="Deploy_Message"><strong>Deploy Message</strong></a></font></td></tr><tr><td><blockquote>
|
| 482 |
|
| 483 | <p>If deployment and startup is successful, you will receive a Message
|
| 484 | like this:</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 485 | <div class="codeBox"><pre><code>OK - Deployed application at context path /foo</code></pre></div>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 486 |
|
| 487 | <p>Otherwise, the Message will start with <code>FAIL</code> and include an
|
| 488 | error message. Possible causes for problems include:</p>
|
| 489 | <ul>
|
| 490 | <li><em>Application already exists at path /foo</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 491 | <p>The context paths for all currently running web applications must be
|
| 492 | unique. Therefore, you must either undeploy the existing web
|
| 493 | application using this context path, or choose a different context path
|
| 494 | for the new one.</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 495 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 496 | <li><em>Document base does not exist or is not a readable directory</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 497 | <p>The URL specified by the <i>WAR or Directory URL:</i> field must
|
| 498 | identify a directory on this server that contains the "unpacked" version
|
| 499 | of a web application, or the absolute URL of a web application archive
|
| 500 | (WAR) file that contains this application. Correct the value entered for
|
| 501 | the <i>WAR or Directory URL:</i> field.</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 502 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 503 | <li><em>Encountered exception</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 504 | <p>An exception was encountered trying to start the new web application.
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 505 | Check the Tomcat logs for the details, but likely explanations include
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 506 | problems parsing your <code>/WEB-INF/web.xml</code> file, or missing
|
| 507 | classes encountered when initializing application event listeners and
|
| 508 | filters.</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 509 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 510 | <li><em>Invalid application URL was specified</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 511 | <p>The URL for the <i>WAR or Directory URL:</i> field that you specified
|
| 512 | was not valid. Such URLs must start with <code>file:</code>, and URLs
|
| 513 | for a WAR file must end in ".war".</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 514 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 515 | <li><em>Invalid context path was specified</em>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 516 | <p>The context path must start with a slash character, unless you are
|
| 517 | referencing the ROOT web application -- in which case the context path
|
| 518 | must be a "/" string.</p>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 519 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 520 | <li><em>Context path must match the directory or WAR file name:</em>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 521 | <p>If the application war or directory is deployed in your Host appBase
|
| 522 | directory and either the Host is configured with autoDeploy=true the Context
|
| 523 | path must match the directory name or war file name without the ".war"
|
| 524 | extension.</p>
|
| 525 | </li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 526 | <li><em>Only web applications in the Host web application directory can
|
| 527 | be deployed</em>
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 528 | <p>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 529 | If the Host deployXML flag is set to false this error will happen
|
| 530 | if an attempt is made to install a web application directory or
|
| 531 | ".war" file outside of the Host appBase directory.
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 532 | </p></li>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 533 | </ul>
|
| 534 |
|
| 535 | </blockquote></td></tr></table>
|
| 536 | </blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Diagnostics"><strong>Diagnostics</strong></a></font></td></tr><tr><td><blockquote>
|
| 537 |
|
| 538 | <table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Finding memory leaks"><!--()--></a><a name="Finding_memory_leaks"><strong>Finding memory leaks</strong></a></font></td></tr><tr><td><blockquote>
|
| 539 |
|
| 540 | <p><strong>The find leaks diagnostic triggers a full garbage collection. It
|
| 541 | should be used with extreme caution on production systems.</strong></p>
|
| 542 |
|
| 543 | <p>The find leaks diagnostic attempts to identify web applications that have
|
| 544 | caused memory leaks when they were stopped, reloaded or undeployed. Results
|
| 545 | should always be confirmed
|
| 546 | with a profiler. The diagnostic uses additional functionality provided by the
|
| 547 | StandardHost implementation. It will not work if a custom host is used that
|
| 548 | does not extend StandardHost.</p>
|
| 549 |
|
| 550 | <p>This diagnostic will list context paths for the web applications that were
|
| 551 | stopped, reloaded or undeployed, but which classes from the previous runs
|
| 552 | are still present in memory, thus being a memory leak. If an application
|
| 553 | has been reloaded several times, it may be listed several times.</p>
|
| 554 |
|
| 555 | <p>Explicitly triggering a full garbage collection from Java code is documented
|
| 556 | to be unreliable. Furthermore, depending on the JVM used, there are options to
|
| 557 | disable explicit GC triggering, like <code>-XX:+DisableExplicitGC</code>.
|
| 558 | If you want to make sure, that the diagnostics were successfully running a full GC,
|
| 559 | you will need to check using tools like GC logging, JConsole or similar.</p>
|
| 560 |
|
| 561 | </blockquote></td></tr></table>
|
| 562 | </blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Server Information"><!--()--></a><a name="Server_Information"><strong>Server Information</strong></a></font></td></tr><tr><td><blockquote>
|
| 563 |
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 564 | <p>This section displays information about Tomcat, the operating system of the
|
| 565 | server Tomcat is hosted on, the Java Virtual Machine Tomcat is running in, the
|
| 566 | primary host name of the server (may not be the host name used to access Tomcat)
|
| 567 | and the primary IP address of the server (may not be the IP address used to
|
| 568 | access Tomcat).</p>
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 569 |
|
刘洪青 | 6266f99 | 2017-05-15 21:21:03 +0800 | [diff] [blame^] | 570 | </blockquote></td></tr></table></td></tr><tr class="noPrint"><td width="20%" valign="top" nowrap class="noPrint"></td><td width="80%" valign="top" align="left"><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="comments_section" id="comments_section"><strong>Comments</strong></a></font></td></tr><tr><td><blockquote><p class="notice"><strong>Notice: </strong>This comments section collects your suggestions
|
| 571 | on improving documentation for Apache Tomcat.<br><br>
|
| 572 | If you have trouble and need help, read
|
| 573 | <a href="http://tomcat.apache.org/findhelp.html">Find Help</a> page
|
| 574 | and ask your question on the tomcat-users
|
| 575 | <a href="http://tomcat.apache.org/lists.html">mailing list</a>.
|
| 576 | Do not ask such questions here. This is not a Q&A section.<br><br>
|
| 577 | The Apache Comments System is explained <a href="./comments.html">here</a>.
|
| 578 | Comments may be removed by our moderators if they are either
|
| 579 | implemented or considered invalid/off-topic.</p><script type="text/javascript"><!--//--><![CDATA[//><!--
|
| 580 | var comments_shortname = 'tomcat';
|
| 581 | var comments_identifier = 'http://tomcat.apache.org/tomcat-7.0-doc/html-manager-howto.html';
|
| 582 | (function(w, d) {
|
| 583 | if (w.location.hostname.toLowerCase() == "tomcat.apache.org") {
|
| 584 | d.write('<div id="comments_thread"><\/div>');
|
| 585 | var s = d.createElement('script');
|
| 586 | s.type = 'text/javascript';
|
| 587 | s.async = true;
|
| 588 | s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
|
| 589 | (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
|
| 590 | }
|
| 591 | else {
|
| 592 | d.write('<div id="comments_thread"><strong>Comments are disabled for this page at the moment.<\/strong><\/div>');
|
| 593 | }
|
| 594 | })(window, document);
|
| 595 | //--><!]]></script></blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr noshade size="1"></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font color="#525D76" size="-1"><em>
|
| 596 | Copyright © 1999-2017, Apache Software Foundation
|
Hongqing Liu | fd5ee81 | 2014-05-10 16:32:51 +0800 | [diff] [blame] | 597 | </em></font></div></td></tr></table></body></html> |