I believe that many people have encountered the problem of starting a maven-managed webapp project in eclipse. This article takes tomcat as an example to explain how to use eclipse and tomcat to start a maven webapp project.
- First import a maven project into eclipse
- Open the servers view of eclipse, Window → Show View → Other…
- Click on the image below to create a new tomcat server
- Select tomcat 7.0, then Next
- Add a tomcat 7.0 installation, then finish
- Right-click your maven project, click Properties, and select Project Facets on the left
- Check Dynamic Web Module, then click on the Further Configuration available... below, this step is very important
- Configure the context information of the project
- Right-click the tomcat server in Servers, click Add and Remove..., and add the maven project to it