1, download the latest Jedis (a Redis Java client), Tomcat Redis Session Manager and Apache Commons Pool, placed in the Tomcat/lib directory
redis:http://redis.io/
Jredis:https://github.com/xetorthio/jedis
Tomcat Redis Session manager:https://github.com/jcoleman/tomcat-redis-session-manager/downloads
Apache Commons pool:http://commons.apache.org/proper/commons-pool/download_pool.cgi
2, add the following content under the <Context> node of context.xml
<valve classname= "Com.orangefunction.tomcat.redissessions.RedisSessionHandlerValve"/>
<manager classname= "Com.orangefunction.tomcat.redissessions.RedisSessionManager"
Host= "192.168.1.192" <!--optional, default is "localhost"--
password= "ABC" <!--selectable--
Port= "6379" <!--optional, default is "6379"-
database= "0" <!--optional, default is "0"--
maxinactiveinterval= <!--optional, default is "60" (Unit: seconds)--/>
ps:tomcat7+jedis2.4.2 directly using the Tomcat Redis Session Manager package error, download the source code after compiling OK, attachments I use the package
Tomcat enables session sharing with Redis