How does IntelliJ idea use Maven Tomcat plug to run web projects

First, run – > Edit configurations, as shown in the figure below:

Then click the plus sign in the upper left corner to add a new configuration, as shown in the following figure:

Select maven, as shown below:

Fill in your configuration information below and click apply, as shown in the following figure:

You can see that the information you just configured will appear in the toolbar. You can run the web project by directly clicking run or debug

Question:

No plugin found for prefix ‘tomcat7’ in the current project and in the plugin groups

Change the way to add Maven’s configuration file in pom.xml

<build>     
    <plugins>           
        <!-- java Compiling plug-ins -->
        <plugin>
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <version>2.2</version>
            <configuration>
                <!-- Specify the port -->
                <port>9101</port>
                <!-- Request Path -->
                <path>/</path>
            </configuration>                
        </plugin>
    </plugins>
</build>

Similar Posts: