天天看点

Linux和window下tomcat虚拟路径的配置方式

配置linux下tomcat虚拟路径:

找到linux下的server.xml文件,在<host>标签内进行如下配置

<host name="localhost"  appbase="webapps"

            unpackwars="true" autodeploy="true"

            xmlvalidation="false" xmlnamespaceaware="false">

        <!-- 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.

        <valve classname="org.apache.catalina.valves.accesslogvalve" directory="logs" 

               prefix="localhost_access_log." suffix=".txt" pattern="common" resolvehosts="false"/>

        <context path="/product/graph" docbase="/usr/local/product/graph" crosscontext="true" trusted="true"></context>

        <context path="/product/word" docbase="/usr/local/product/word" crosscontext="true" trusted="true">

        </context> <context path="/micaps" docbase="/usr/local/micaps" crosscontext="true" trusted="true"></context>

      </host>

配置window下tomcat虚拟路径:

            unpackwars="true" autodeploy="true">

             documentation at: /docs/config/valve.html

             note: the pattern used is equivalent to using pattern="common" -->

               prefix="localhost_access_log." suffix=".txt"

               pattern="%h %l %u %t "%r" %s %b" resolvehosts="false"/>

  <context reloadable="true" docbase="d:\product\graph" path="/product/graph"/>

  <context reloadable="true" docbase="d:\product\word" path="/product/word"/>

  <context reloadable="true" docbase="d:\micaps" path="/micaps"/>

截图如下:

Linux和window下tomcat虚拟路径的配置方式

如果linux下内存溢出,需要在linux下的tomcat-->bin-->catalina.sh中配置如下参数:

Linux和window下tomcat虚拟路径的配置方式

继续阅读