A few days ago, I made an electronic greeting card sending system, I have always wanted to pack it into a WAR file, I don't know what, I first used Sun's DeployTools results to find the generated package, halo! Then check the information, it turned out to be so simple, I didn't quite understand!
Steps to package the web application: 1. Establish a web application, the directory is as follows: D: / tomcat 5.0 / webapps / netcard / *. JSP (the directory where the JSP file is located) D: / tomcat 5.0 / webapps / netcard / web-inf / Classes / *. Class (Class file location) D: / tomcat 5.0 / webApps / netcard / web-inf / class / *. jar (Class library file location) D: / tomcat 5.0 / webapps / netcard / web-infer /classes/web.xml (Web application deployment file) 2. Package the web application with the jar command:
D: /> CD Tomcat 5.0 / WebApps / NetCard D: / Tomcat 5.0 / WebApps / NetCard> JAR CVF NetCard.war *. * Where -C creates a new document -V generation detailed output to standard output -f specified archive file name
3. Copy the NetCard.war file to the