The compiled projects of general projects are all under Tomcat's webapps, and the access path of the project is generally: http://localhost:8080/project virtual path. However, the default access page of Tomcat http://localhost:8080 accesses the page with cats in Tomcat. If you want to directly enter the local address http://localhost:8080, you can get the default access page of the project, and perform the following configuration :
After Tomcat is installed, the default directory of tomcat is the webapps/root directory. If you want to change the default access directory, that is:
after opening the location where Tomcat is installed, find this line in conf/server.xml under Tomcat:
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
Add it in the middle of <Host …></Host> ( pay attention to the case of the project name, the default is all lowercase, because the project name in web.xml is set to be all lowercase by default )
<Context docBase="[project name here]" path="" debug="0" reloadable="true" />
<Context path="" docBase="myPojectTest" debug="0" reloadable="true"/>