Home > Back-end >  In tomcat 7, each invocation RequestContextHolder get the session id is different
In tomcat 7, each invocation RequestContextHolder get the session id is different

Time:01-01

The original spring MVC project in tomcat 6 run migrated to tomcat 7 runtime, appear the same controller for each set and get the session id are not the same problems
The code is as follows:




In tomcat 7 environment, access to the session, resulting in abnormal login:


Switch back to the tomcat6 normal:


Java code feel no problem, what should be a tomcat 7 to change configuration can run normally,

CodePudding user response:

With the request directly. GetSession () to obtain, to see if is consistent,
  • Related