Compressed into war format

Source: Internet
Author: User

1. Key points: you only need to set the webroot directory and Java sourceProgramClass files can be packaged.

The directory structure after packaging is -- |

| ------ META-INF

-- | ---- | -- WEB-INF

| ----- Lib

| ----- Class

| ----- Web. xml

| -----. Jsp

2. Copy these files to a separate folder, such as the project folder, according to the preceding directory format.

Find the project directory in DOS and run the command: D:/Project> jar-CVF/D: A. War *

Note: D:/Project> is the directory that contains all files and folders;

/D: A. jar is the name of the JAR file to be generated. jar and the directory to be stored. You can set/d by yourself:

Stored in disk D.

* It means to compress all the files in the project directory, and the contents of the compressed jar files

The record structure is the same as the original one.

3. Put the jar package in the Directory D:/tomcat-6.0.13/webapps under tomcat, that is, webapps.

Start Tomcat and enter http: // localhost: 8080/A/**. jsp in the address bar.

Note: The name of the jar package A. Jar should be the same as the name of your project, because it may be

Items are used for page Jump.

Target path. If the jar package name is different from the project name, an error may occur. The display page cannot be found.

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.