Use Maven in eclipse to create a web project, eclipsemaven

Source: Internet
Author: User

Use Maven in eclipse to create a web project, eclipsemaven

Use Maven to create a web project in eclipse:

Method 1:

Right-click to create a maven project and select create simple project.

Enter the information. Note that the packaging method should be changed to war.

Click Finish. The created project directory is as follows:

There is no WEB-INF directory in the project, let eclipse help us complete:

Right-click the project name, select properties, and find the corresponding location. Set Dynamic Web Moudle version to 3.0, deselect this option, and select the application. The following prompt is displayed:

Click the Content to change the default Content directory to OK.

Method 2:

Create a new project, but do not check create simple project, search for web, select this option, Next

Enter the information to complete. The java and test directories cannot be found in the project directory.

You only need to change the jre library to your own.

The disadvantage of this method is that you cannot change the web Project version as in the first method. The default value is 2.3, which does not support jstl and needs to be changed manually:

Modify web. xml and copy a new web3.0 header to overwrite the original one.

Change the file in. setting to 2.3.

 

The preceding two methods are used to create a web project using Maven in eclipse. If there is any incorrect or simpler method, please advise.

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.