0

我把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 &quot;%r&quot; %s %b" resolveHosts="false"/>

  </Host>
4

1 回答 1

2

大胆猜测,deployOnStartup 是否未设置为 true?

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

于 2013-09-13T20:40:07.647 回答