Now that it is configured, the session can be stored in redis, but the session is not shared
JSESSIONID=85BA6B206C53213A7147C31C1FDEA7B9.webuiApp
JSESSIONID=F75A1BBC59A873467CF6872F9C40A140.webuiApp2
webuiApp and webuiApp2 are The names of my two tomcats What settings do tomcat need now to allow two tomcats to share session
List items
大家讲道理2017-05-18 10:47:33
The HttpSession that comes with the servlet does not implement the Serialize interface and cannot be stored in redis. Since your session can be stored in redis, it means that you are using a custom session.
I don’t know which framework you are using? If you don't use a framework, you need to implement the session management method yourself.
The general idea is as follows:
It is recommended that you use the framework Apache Shiro, which is a security framework and has its own session. He has implemented ehcache to store sessions.
If you want to use other caches (such as redis), you need to write the code yourself. Not very complicated