I use the community version of Idea, the community version of the No Tomcat plugin, only use the Maven plugin for Tomcat use, the following to get to the point
I. Pom.xml Configuring the Tomcat Plugin
<Build> <Finalname>Javademo</Finalname> <Plugins> <plugin> <groupId>Org.apache.tomcat.maven</groupId> <Artifactid>Tomcat7-maven-plugin</Artifactid> <version>2.2</version> <Configuration> <Path>/${build.finalname}</Path> <Port>8080</Port> </Configuration> </plugin> </Plugins> </Build>
Build.plugins tag is the configuration plug-in, the configuration of the TOMCAT7 plug-in, the Web project will run on this plugin;
After starting the basepath such as:
Ii. Tomcat Plugin Configuration Property Description
Path is the way to access the app
Port is the port number of Tomcat
Uriencoding is the URL by UTF-8 encoding, this solves the Chinese parameter garbled.
Server is specifying the tomcat name.
Java Learning 01-Build a Web Maven project with Maven plugin Tomcat