Assume that there is a web application: C: / MyHome
MyHome / Web-inf / ... myhome / files / ... myhome / image / ... myhome / src / ... myhome / index.jsp
Perform the following command under the command line window:
C: /> CD MYHOME
C: / myhome /> jar cvf myhome.war * /.
Explanation: JAR CVF [A = "WAR Packet Name] .war [b =" Resource File and Folder] [C = "will generate the target folder of the WAR package]
"* /" (B = ") represents all files and folders under the current directory (c: / myhome).
"." (C = ") indicates that the WAR package will be generated in the current directory.
After the operation is complete, find the newly generated MyHome.war under C: / MyHome, copy it into tomcat_home / webapps /. Then start Tomcat.