How to add a Spring project to Tomcat configuration using Eclipse IDE, so that Tomcat will load the index page from web.xml

Add a plugin configuration to your pom.xml

<build>
  ...
  <plugins>
   ...
   <plugin>
     <groupId>org.apache.tomcat.maven</groupId>
     <artifactId>tomcat7-maven-plugin</artifactId>
     <version>2.2</version>
     <configuration>
        <url>http://www.url.org:1234/manager/text</url>
        <!-- for ex: url>http://localhost:8080/manager/text</url -->
        <path>/myWebApp</path>
     </configuration>
   </plugin>
   ...
  </plugins>
  ...
</build>

eclipse
enter image description here

enter image description here
enter image description here

Or via Terminal / cmd:

mvn tomcat7:run / mvn tomcat7:deploy / mvn tomcat7:undeploy / mvn tomcat7:undeploy

Read more here: Source link