我把war文件放在/webapps目录下,运行启动tomcat ./startup.sh
,war文件没有部署,但是tomcat启动成功,可以看到tomcat启动页面。
为什么没有部署war文件?
Using CATALINA_BASE: /var/company/apache-tomcat
Using CATALINA_HOME: /usr/local/lib/apache-tomcat
Using CATALINA_TMPDIR: /var/company/apache-tomcat/temp
Using JRE_HOME: /packages/encap/java-1.6.0_24
Using CLASSPATH: /usr/local/lib/apache-tomcat/bin/bootstrap.jar:/var/company/apache-tomcat/bin/tomcat-juli.jar
这是来自 server.xml。
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" resolveHosts="false"/>
</Host>