tomcat的server.xml里host节点配置的一些说明

tomcat的server.xml里host节点配置的一些说明

公司里项目混乱,一直resin和tomcat7,8乱用,崽加上项目结构很垃圾,每次SVN下来的东西要重新配置;就需要研究一下server.xml的具体配置问题

tomcat8中:

    

<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" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t &quot;%r&quot; %s %b" />

</Host>

  在上述</Host>节点前添加配置: 

  <Context path="" docBase="G:/apache-tomcat-8.0.24/webapps/newiims/" debug="0"/>

  name:对应的是你项目的域名;
appBase:虚拟目录的路径(用来运行jsp的目录);
doBase:项目的顶级目录就相当于webapps 中的目录名称,也就是iis中的网站根目录;
配置完成后记得把你的项目复制到D:\webroot目录下,我的项目是ecshoping

 

参考:http://www.jb51.net/article/51925.htm

posted @ 2015-10-13 16:17  半天的半天  阅读(6037)  评论(0编辑  收藏  举报