在tomcat/conf/context.xml 下
配置memcached
<Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
memcachedNodes="n1:localhost:11211"
requestUriIgnorePattern=".*/.(png|gif|jpg|css|js)$"
sessionBackupAsync="false"
sessionBackupTimeout="100"
transcoderFactoryClass="de.javakaffee.web.msm.serializer.javolution.JavolutionTranscoderFactory"
copyCollectionsForSerialization="false"/>
启动tomcat 就报错 端口占用
去掉context.xml的 memcached 的配置 就能启动~ why 啊
去掉这个启动就不报错么? 对的<EnginedefaultHost="localhost"name="Catalina">
<!--Forclustering,pleasetakealookatdocumentationat:
/docs/cluster-howto.html (simplehowto)
/docs/config/cluster.html(referencedocumentation)-->
<!--
<ClusterclassName="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->
<!--UsetheLockOutRealmtopreventattemptstoguessuserpasswords
viaabrute-forceattack-->
<RealmclassName="org.apache.catalina.realm.LockOutRealm">
<!--ThisRealmusestheUserDatabaseconfiguredintheglobalJNDI
resourcesunderthekey"UserDatabase". Anyedits
thatareperformedagainstthisUserDatabaseareimmediately
availableforusebytheRealm. -->
<RealmclassName="org.apache.catalina.realm.UserDatabaseRealm"resourceName="UserDatabase"/>
</Realm>
<HostappBase="webapps"autoDeploy="true"name="localhost"unpackWARs="true"deployOnStartup="false">
<!--SingleSignOnvalve,shareauthenticationbetweenwebapplications
Documentationat:/docs/config/valve.html-->
<!--
<ValveclassName="org.apache.catalina.authenticator.SingleSignOn"/>
-->
<ContextdocBase="nginx"reloadable="false"path="/nginx">
<ManagerclassName="de.javakaffee.web.msm.MemcachedBackupSessionManager"
memcachedNodes="n1:localhost:11211"
requestUriIgnorePattern=".*.(png|gif|jpg|css|js)$"
sessionBackupAsync="false"
sessionBackupTimeout="100"
transcoderFactoryClass="de.javakaffee.web.msm.serializer.javolution.JavolutionTranscoderFactory"
copyCollectionsForSerialization="false"
/>
</Context>
<!--Accesslogprocessesallexample.
Documentationat:/docs/config/valve.html
Note:Thepatternusedisequivalenttousingpattern="common"-->
<ValveclassName="org.apache.catalina.valves.AccessLogValve"directory="logs"pattern="%h%l%u%t"%r"%s%b"prefix="localhost_access_log."suffix=".txt"/>
</Host>
</Engine>
server.xml的配置
<aclass='referer'target='_blank'>@爱在戏院前 是tomcat端口占用还是memcached端口占用? 把错误发出来tomcat端口占用靠真丢人看错日志了。其实是jar包依赖错误!结贴!版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。