How do I update a Tomcat webapp without restarting the entire service?

前端 未结 3 1993
迷失自我
迷失自我 2020-11-28 19:00

I\'m new to Tomcat. We have a dev machine with about 5 apps running. Even though it\'s dev, it\'s used by our clients pretty heavily during testing.

S

3条回答
  •  粉色の甜心
    2020-11-28 19:10

    There are multiple easy ways.

    1. Just touch web.xml of any webapp.

      touch /usr/share/tomcat/webapps//WEB-INF/web.xml
      

    You can also update a particular jar file in WEB-INF/lib and then touch web.xml, rather than building whole war file and deploying it again.

    1. Delete webapps/YOUR_WEB_APP directory, Tomcat will start deploying war within 5 seconds (assuming your war file still exists in webapps folder).

    2. Generally overwriting war file with new version gets redeployed by tomcat automatically. If not, you can touch web.xml as explained above.

    3. Copy over an already exploded "directory" to your webapps folder

提交回复
热议问题