Detailed configuration address:Https://github.com/izerui/tomcat-redis-session-manager
It was simple.
1. Add below Tomcat/lib
Commons-pool2-2.2.jar
Jedis-2.5.2.jar
Tomcat-redis-session-manager-2.0.0.jar
2, modify Conf/context.xml, add
<valve classname= "Com.orangefunction.tomcat.redissessions.RedisSessionHandlerValve"/>
<manager classname= "Com.orangefunction.tomcat.redissessions.RedisSessionManager"
host= "localhost"
Port= "6379"
Database= "10"
Maxinactiveinterval= "/>"
3. Start Tomcat. but it's not .
Console, Redis-cli-p 6379 Monitor, view monitoring, Discover
? ? 1446535340.801463 [127.0.0.1:41285] "EXPIRE" "51cd8408a65738d6187c3067bde4072d" " -60" ? ?
I see....... The configuration in Web. XML is as follows:
<session-config>
<session-timeout>-1</session-timeout>
</session-config>
It's really a chrysanthemum wound, crap!!
Nginx+tomcat+redis's disgusting problems.