Tomcat用memcached共享session如果操作啊

Cobbage 发布于 2017/02/06 22:22
阅读 347
收藏 0

 在context里面添加配置

<Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
             memcachedNodes="n1:127.0.0.1:11212"     
             lockingMode="auto"
             sticky="false" 
             requestUriIgnorePattern= ".*\.(png|gif|jpg|css|js)$"    
             sessionBackupAsync= "false"   
             sessionBackupTimeout= "100"      
             transcoderFactoryClass="de.javakaffee.web.msm.JavaSerializationTranscoderFactory"    
    />

lib下添加jar包

启动memcached

telnet能进去

启动程序然后看到有sessionid 

Accept	
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding	
gzip, deflate
Accept-Language	
zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Connection	
keep-alive
Cookie	
JSESSIONID=108B3C2CC9DABE7B287B12F2FE1B2F2D-n1
Host	
localhost:8080
Referer	
http://localhost:8080/WebContent/
Upgrade-Insecure-Requests	
1
User-Agent	
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0

但是访问链接的时候拦截器怎么把它打回了?

以下是问题补充:

@Cobbage:又莫名其妙的好了 (2017/02/06 22:40)
加载中
返回顶部
顶部