-<Host name="localhost" autoDeploy="true" unpackWARs="true" appBase="webapps">
<!-- 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 "%r" %s %b" />
-->
<Context sessionCookieName="MYSELF_SESSION1" sessionCookiePath="/" reloadable="true" debug="0" docBase="/home/webServer/apache-tomcat-7.0.78_item1/webapps/ROOT.war" path="/"> </Context>
</Host>
在每個項目的tomcat下的conf文件server.xml添加如上沒有註釋掉的代碼,注意sessionCookieName屬性不同項目用不同的名稱命名即可,其他屬性指定正確就可以了