配置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 &quot;%r&quot; %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下内存溢出,需要在linux下的tomcat-->bin-->catalina.sh中配置如下参数: