我们 通过
memcache 实现
下载memcache的windows稳定版,安装
比如 meemcache 安装 在 192.168.3.1 服务器上 ,
本机 的 tomcat 里的 conten.xml 文件 修改 如下
<?xml version="1.0" encoding="UTF-8"?> <WatchedResource>WEB-INF/web.xml</WatchedResource> <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager" memcachedNodes="n1:192.168.3.1:11211" lockingMode="auto" sticky="false" requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)|\f5.jsp$" sessionBackupAsync="false" sessionBackupTimeout="100" transcoderFactoryClass="de.javakaffee.web.msm.serializer.javolution.JavolutionTranscoderFactory" copyCollectionsForSerialization="true"/> </Context>