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.