java - war 文件没有爆炸的原因可能是什么?

标签 java linux tomcat web-applications

War 文件在部署到 webapps 文件夹后不会爆炸。

我们使用的是 tomcat 7,下面是我遵循的过程。

  1. 停止tomcat服务
  2. 部署war文件
  3. 启动tomcat服务

我已经将 auto deploy 和 unpackwars 设置为“True”

下面是 server.xml 文件:

  <Host name="x.x.x.x"  appBase="/var/lib/dweb13s2/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" />

  </Host>

最佳答案

查看文档 RemoveUnpackWARs .可能你还没有去掉之前的目录结构。

If unpackWARs=true and a WAR is updated while Tomcat is stopped, Tomcat will not realise that the unpacked directory structure is from an older version of the WAR and will continue to use it.

关于java - war 文件没有爆炸的原因可能是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38013601/

相关文章:

java - 如何在 Tomcat 中为 Java EE 应用程序实现套接字

java - 从 ResultSet 获取 MYSQL 表名

java - Parquet .io.ParquetDecodingException : Can not read value at 0 in block -1 in file

java - 有效的 CMIS 查询

c - 终端顶行未按预期清除

tomcat - 多个 Spring 引导配置

java - Worklight 6 升级失控

linux - bash 脚本上的奇怪错误

linux - 使用 GREP 查找是否在特定文件夹中找到文件的每一行

ruby-on-rails - http中的Host header有什么用?