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)