tomcat:startup.sh不部署war文件

时间:2013-09-13 20:36:47

标签: tomcat

我将war文件放在/ webapps目录下,当我通过运行./startup.sh启动tomcat时,未部署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 &quot;%r&quot; %s %b" resolveHosts="false"/>

  </Host>

1 个答案:

答案 0 :(得分:2)

粗略猜测,deployOnStartup是否设置为true?

显示一些配置和/或控制台输出可能会有所帮助。