日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > windows >内容正文

windows

windows7+tomcat7+nginx1.11.3 +memcached

發(fā)布時(shí)間:2025/3/15 windows 21 豆豆
生活随笔 收集整理的這篇文章主要介紹了 windows7+tomcat7+nginx1.11.3 +memcached 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

測試的環(huán)境是windows7+tomcat7+nginx1.11.3 +memcached

安裝方法網(wǎng)上很多就不多說了。?
1.session共享需要這幾個(gè)jar 包?
?
下載地址?
http://download.csdn.net/detail/scau_rich/7791157?
2.解壓到tomcat lib目錄下面 兩個(gè)tomcat都需要。?
3.新建JSP頁面放入tomca webapps/root目錄下面(兩個(gè)tomcat都要放)

<%@page language="java"%> <html> <body> <h1><font color="red">Session serviced by tomcat</font></h1> <table aligh="center" border="1"> <tr> <td>Session ID</td> <td><%=session.getId() %></td> <% session.setAttribute("abc","abc");%> </tr> <tr> <td>Created on</td> <td><%= session.getCreationTime() %></td> </tr> </table> </body> <html>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17

4.在tomcat的conf文件夾里面配置content.xml 兩個(gè)tomcat 都需要配置?
`

<!-- Default set of monitored resources --> <WatchedResource>WEB-INF/web.xml</WatchedResource><!-- Uncomment this to disable session persistence across Tomcat restarts --> <!-- <Manager pathname="" /> --> <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager" memcachedNodes="n1:localhost:11211" requestUriIgnorePattern=".*\.(png|gif|jpg|css|js)$" sessionBackupAsync="false" sessionBackupTimeout="100" transcoderFactoryClass="de.javakaffee.web.msm.serializer.javolution.JavolutionTranscoderFactory" copyCollectionsForSerialization="false" /> <!-- Uncomment this to enable Comet connection tacking (provides eventson session expiration as well as webapp lifecycle) --> <!-- <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" /> -->

`?
5.運(yùn)行tomcat .nginx memcahced?
6.打開瀏覽器。按F5刷新?
?
?
看到這個(gè)說明session共享成功了

創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎勵來咯,堅(jiān)持創(chuàng)作打卡瓜分現(xiàn)金大獎

總結(jié)

以上是生活随笔為你收集整理的windows7+tomcat7+nginx1.11.3 +memcached的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。