[Original] Simply Method for Packaging the web application into a WAR file with a jar command

xiaoxiao2021-03-06  60

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.

转载请注明原文地址:https://www.9cbs.com/read-117286.html

New Post(0)