The tomcat:run command in Maven uses the Tomcat6 version by default.
Now you need to use the Tomcat7 or above version, configure it in the Maven project of eclipse as follows
Step 1: Add the following configuration to the project's pom:
Official website configuration: http://tomcat.apache.org/maven-plugin-trunk/
<pluginManagement> <plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat6-maven-plugin</artifactId> <version>2.3-SNAPSHOT</version> </plugin> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.3-SNAPSHOT</version> </plugin> </plugin> </plugins> </pluginManagement>
Step 2: When starting the project, run as --> Maven Build --> Select the project path, and write tomcat7:run in Goals
Just run
The above is all the content of this article. I hope it will be helpful to everyone's learning and I hope everyone will support Wulin.com more.