When Tomcat extracts the war package

Source: Internet
Author: User

Turn from: http://www.cnblogs.com/fatsnake/p/5631785.html

When a war package is copied to the Tomcat WebApps directory, if no project of the same name exists, the war package is uncompressed when the Tomcat is started, resulting in a project with a name.

However, if a project directory with the same name as the war package already exists under WebApps, the war package will not be decompressed even if Tomcat is restarted, that is, the code in the previously-named Engineering directory is still running, not the new code in the war package.

Based on this situation, the following approaches have been adopted:

Copy Target\*.war D:\java_tools\tomcat6\webapps\

CD D:\java_tools\tomcat6\webapps

For%%a in (*.war) do rd/q/S "%%~na"

Call D:\java_tools\tomcat6\bin\startup.bat

The main ideas are:

By copying the war package to the WebApps directory, traversing all the war packages, deleting the engineering directory with the same name as the war package in the WebApps directory, and then restarting Tomcat, the war package will be decompressed so that the latest code can be deployed on each tomcat.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.