Eclipse+maven Creating a WebApp Project

Source: Internet
Author: User

Original address: http://www.cnblogs.com/AloneSword/p/3998557.html

Eclipse+maven Create WebApp project < a >

1. Open Eclipse, right-click new--"Other, if you find Maven project

2. Select Maven Project, display the window to create the MAVEN project, tick, create a simple project

3. Enter the basic information for the MAVEN project as shown in:

4, complete the creation of the MAVEN project, generate the corresponding MAVEN project results, as shown below, some of the structure here is not required by the project, we need to remove:

5, select the project, right-click Properties, go to the property page, select the Maven menu, as shown in:

6, choose Java Version 1.7, and remove the other two, such as:

7, click OK, again back to the project structure, the project structure is relatively clear, in line with the MAVEN project we want to create

8, at this time the results of WebApp is not shown, because at this time we have not configured this project for the Web project, again into the properties configuration, as shown in:

9, click further configuration available ..., as follows:

10. Configure Src/main/webapp, and tick the option to generate Web. XML, as follows:

11. After determining, return to the Maven menu to remove the dynamic Web module check, click OK, as shown below, the WEBAPP directory structure is displayed:

12, at this time also need to configure, Src/main/webapp for the "/" project root directory, as follows:

13, complete the configuration as above, the final completion of the MAVEN WEBAPP project structure as shown:

In the final step, we will point the current build path to Maven Dependency, click Add directly, choose Java Build path Entries and next

then click Finish to finish

after completion such as:

now a maven-based WebApp is built and can be published directly from Eclipse into Tomcat

Eclipse+maven Creating a WebApp Project

Related Article

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.