vi server.xml #192.168.2.140下的tomcat添加 <Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat1"> #192.168.2.136下的tomcat添加 <Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat2">
vi server.xml
<!-- tomcat1 index.jsp --> <%@ page language="java"contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <html> SessionID:<%=session.getId()%> </br> SessionIP:<%=request.getServerName()%> </br> <h2>tomcat1</h2> </html>
<!-- tomcat2 index.jsp --> <%@ page language="java"contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <html> SessionID:<%=session.getId()%> </br> SessionIP:<%=request.getServerName()%> </br> <h2>tomcat2</h2> </html>
./startup.sh
<ManagerclassName="de.javakaffee.web.msm.MemcachedBackupSessionManager" memcachedNodes="n1:192.168.17.9:11211" sticky="false" lockingMode="auto" sessionBackupAsync="false" requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$" sessionBackupTimeout="1000" transcoderFactoryClass="de.javakaffee.web.msm.serializer.kryo.KryoTranscoderFactory"/>
./shutdown.sh ./startup.sh
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。