tomcat设置访问路径与实际路径

tomcat访问地址修改指向实际路径,修改server.xml。

在host标签下添加contest标签

<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html
             Note: The pattern used is equivalent to using pattern="common" -->
              <Context path="/*****" docBase="./ui" />
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log." suffix=".txt"
               pattern="%h %l %u %t "%r" %s %b" />

      </Host>

  

 

 

访问时直接端口号/path中填的文字即可。

 

posted on 2020-12-03 14:58  Happy丶Liu  阅读(1963)  评论(0编辑  收藏  举报

导航