tomcat deployment project access method without project name

Direct topic: To access the tomcat deployment project without adding the project name, open the server.xml file in the conf directory of tomcat and
add
<Context path="" docBase="" reloadable="false" />

<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">
		<Context path="" docBase="" reloadable="false" />
 
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log." suffix=".txt"
               pattern="%h %l %u %t "%r" %s %b" />

      </Host>

docBase: represents the path of the project,
note: add your project's path published in tomcat's webapps here, an error will be reported if the path cannot be accessed

path: represents the project name when accessing

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326291644&siteId=291194637