Method One : Modify the server.xml file
Advantages :
Configuration is fast, just add <Context> tags to the server.xml file , where you configure the path virtual path and docBase the real path and start the Tomcat Server
Disadvantages :
Need to configure two paths if path is an empty string, default configuration
Restart the Tomcat server after each modification of the server.xml file , redeploy
Method Two : create a virtual host under the Catalina folder and configure the virtual host
Advantages :
Configure the . XML fileunder the virtual host, the docBase in the <Context> tag point to the file path that needs to be deployed, The server background is automatically deployed, modified once in a background deployment, without having to start the Tomcat Server repeatedly
This approach is more intelligent than the method three
You can modify the virtual address name, which is the address content entered in the browser's address bar
Disadvantages :
You need to create a new . xml file under a specific folder and configure the path to the file that the file points to
Method Three : Move the Web app directly to the server's webapps
Advantages :
If you have a pre-prepared Web app, you can deploy it quickly
Disadvantages :
Requires people to manually move the Web app to WebApps , not very user-friendly in actual operation
Note:
Deploying a Web site to a server-side general approach two
Advantages and disadvantages of three ways to deploy Web applications