Modify the project publish location under server under Tomcat\webapps (before project release)

Source: Internet
Author: User

The MAVEN project is released by default to the target directory (for example: E:\MavenWorks\babasport\target);when you develop a Web project, you also need to manually copy it to the Web server (Tomcat)If you can automatically deploy to a Web server, it would be better not to manually copy the war package under target into Tomcat every time.

Here are the specific ways to use it:

First step: Modify the publishing path to WebApps
Step Two: Modify the server start and stop time to 300 seconds
Step three: 1 Publish to WebApps root directory (Project Access URL does not need to fill in the project name, such as direct http://localhost:8080 access) 2 Uncheck Auto Release
---------Setup is complete to start Tomcat, the project is published in the following location:


Fourth step: Browser access  http://localhost:8080/  (omitted project name) Note: If you use Eclipse,http://localhost:8080/ project name /can also be accessed;With MyEclipse, you can only access http://localhost:8080/




Note: If you cannot successfully publish to/from the directory, you may need to make the following modifications (generally by default, do not change)

1 Delete Webcontext's release

2 Add WebApp Publish to the root directory

3 Add Maven library (jar package) to Web-inf/lib











Modify the project publish location under server under Tomcat\webapps (before project release)

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.