Java Learning 01-Build a Web Maven project with Maven plugin Tomcat

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.