tomcat session 共享 redis
简单操作,两步骤搞定 tomcat 集群 session共享,用于单点登录,web 集群等
jar包 及配置下载 :http://download.csdn.net/download/knight_black_bob/9821122
1.添加 redis session jar 到 tomcat中
2. 配置 tomcat context.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --><!-- The contents of this file will be loaded for each web application --><Context> <!-- Default set of monitored resources --> <WatchedResource>WEB-INF/web.xml</WatchedResource> <!-- Uncomment this to disable session persistence across Tomcat restarts --> <!-- <Manager pathname="" /> --> <!-- Uncomment this to enable Comet connection tacking (provides events on session expiration as well as webapp lifecycle) --> <!-- <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" /> --> <Valve className="com.orangefunction.tomcat.redissessions.RedisSessionHandlerValve"/> <!-- <Manager className="com.orangefunction.tomcat.redissessions.RedisSessionManager" database="0" host="localhost" maxInactiveInterval="60" password="123456" port="6379"/> --> <Manager className="com.orangefunction.tomcat.redissessions.RedisSessionManager" database="0" host="localhost" maxInactiveInterval="60" port="6379"/> </Context>
本地没有 redis 密码 ,就去掉 password="123456" ....
捐助开发者
在兴趣的驱动下,写一个免费
的东西,有欣喜,也还有汗水,希望你喜欢我的作品,同时也能支持一下。 当然,有钱捧个钱场(支持支付宝和微信 以及扣扣群),没钱捧个人场,谢谢各位。
个人主页:http://knight-black-bob.iteye.com/
谢谢您的赞助,我会做的更好!
相关推荐
tomcat session共享 redis
使用说明:请严格按照资源内的readme文档来说明部署,不要搞错版本,完美支持Tomcat8和Tomcat9等新版本Tomcat,仅支持JDK8以上版本JDK。
nignx 进行负载后session失效的完美解决,亲测可用
tomcat7 + redis单点 session共享 jar 提供支持tomcat7 + redis单点 实现session共享的jar资源
tomcat8 redis session共享,提供commons-pool2-2.3.jar,jedis-2.7.2.jar和修改后的tomcat-redis-session-manager-master-2.0.0.jar及部署文档
tomcat7+redis集群 session共享jar 提供支持tomcat7 + redis单点 集群 实现session共享的jar资源
基于 Redis 的Tomcat Session共享。 对Git项目tomcat-redis-session-manager 做了简单修改。 使用方法,可以参考博客: http://blog.csdn.net/catoop/article/details/48603891
linux.tomcat-session共享.redis.安装包
3、将redisson-all-3.11.2.jar和redisson-tomcat-8-3.11.2.jar 拷贝到${catalina.base}\lib下 4、在原有tomcat\context.xml下 添加 以下代码(参考 <Manager className="org.redisson.tomcat....
很好用,使用也很简单,把其中的三个Jar包拷贝到你的tomcat中的...tomcat8、8.5、9与redis实现session共享,并可以通过修改源码可自定义session键,访问地址:http://blog.csdn.net/fackyou200/article/details/78929008
Session共享 tomcat7+redis的session共享实现,无需重新打包,直接放入tomcat lib中就可以使用,记得修改tomcat的content.xml
redis tomcat7 session共享
包含tomcat集群redis会话共享的依赖jar包,包含有2.1.0和2.7.2两个版本,配置方式稍微有点差别,两个版本不兼容。 2.1.0版包含 commons-pool-1.6.jar jedis-2.1.0.jar tomcat-redis-session-manager-1.2-tomcat-7....
tomcat集群使用redis解决session共享问题,压缩包包含redisclient-win32.x86.2.0客户端、Redis-x64-3.2.100服务、tomcat-redis-session以及部署安装文档
该资源是用于测试tomcat7-redis实现session共享的demo程序,用户可以直接下载使用
tomcat7 tomcat8 使用redis做session共享jar包 已编译过直接可以使用
这个包里含有commons-pool2-2.4.2、jedis-2.9.0、tomcat85-session-redis-1.0三个主要JAR包。apache-tomcat-8.5.20.tar.gz源码包和context.xml文件,这套配置是我自己亲测可用的。。另外我用的redis4这个版本。注意...
下载压缩包,里面有对应的tomcat的需要的jar,并且部署文档。按照里面修改就行了
Session共享 tomcat8+redis的session共享实现,支持tomcat8
支持tomcat8的redis-session共享的三个jar包