First look at the Server.xml file host configuration
- <Host name="localhost" appbase="WebApps" can be modified to the desired directory
- unpackwars="true" autodeploy="true" >
AppBase: The subdirectory below this directory will automatically be deployed as an app, and the war file will be automatically decompressed and deployed as an app, the default is tomcat under the WebApps directory, if you do not want to access the default root directory, modify here, similarly if you want to access the configuration directory application as the default application, In this directory, add the root directory folder.
We can also configure the virtual directory under host
<Context path="" docBase="D:\WebContent" sessionCookiePath="/" sessionCookieName="JSESSIONID" />
Docbase just points to your app's directory, which can have nothing to do with appbase.
If you make them repeat, that is, 2 points to a directory, also can run, but the application of each sub-directory below, is actually deployed as a separate application, this is the difference between the two and contact
The difference between the Tomcat virtual directory configuration appbase and Docbase