1.將下面幾個jar包依賴放到tomcat的lib目錄下:

2.修改tomcat/conf下context.xml文件,在<Context>節點添加如下代碼:
<Valve className="com.naritech.nicole.gump.RedisSessionHandlerValve" />
<Manager className="com.naritech.nicole.gump.RedisSessionManager"
host="host"
port="port"
<!-- 必須有密碼 -->
password="password"
database="0"
maxInactiveInterval="60"/>
3.重啟。有多少台tomcat,重復多少次上述操作。
4.自行驗證結果。
