Some details to be aware of the idea of creating a MAVEN Web project

Source: Internet
Author: User

Build the MAVEN Java Web project in idea, from new project to select Maven skeleton to final finish, after the entire process is complete, the project infrastructure is out, but there is some distance from a Web project that can run normally.

First, the project directory structure is perfect

is a newly built directory structure, look carefully will find the missing directory, first to the missing directory.

Use Shift+ctrl+alt+s to enter the project directory settings to find MODULES->SRC as shown:

In this interface, complete the directory structure and Mark as, which complements the completion as shown in:

Note The new Java directory mark is sources, where the directory structure is completed.

Second, Reliance

Web projects are typically run in a Web container, using Tomcat, so add Web container dependencies, or find the dependenies option in the previous section of the interface to add dependencies, such as:

Once added, click Apply below to complete this step.

Third, add fects

The specific steps are as follows:

After adding as shown, this time two paths will appear a web directory is not before, in fact, this corresponds to the project directory structure of the WebApps, so manually modified, modified to complete such as:

Iv. setting artifacts

Configuring the Tomcat runtime requires artifacts, with the following setup steps:

Note here that you choose from moudules instead of manually creating it yourself. Create archive after exploded is created, as in the steps. Create complete such as:

To this, a complete Web project completed, can be normal development, run.

Some details to be aware of the idea of creating a MAVEN Web project

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.