In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to handle exceptions with empty session acquisition". The explanation content in this article is simple and clear, easy to learn and understand. Please follow the ideas of Xiaobian to study and learn "how to handle exceptions with empty session acquisition" together.
Originally, the server side is a stand-alone tomcat operation, and the interface side obtains the jsessionid value in the cookie of the request response as the cookie of the later request, so that the session can be used.
Upgrade the server to distributed, use hazelcast to cache and save the session, at this time, the interface request to obtain the session is null
Reason: Jsessionid is just tomcat's name for sessionid, which is actually sessionid; in other containers, it may not be called jsessionid, but the interface side is written dead Jsessionid=***
Looking at the browser interface, the response is session=********, which means that hazelcast gets the cookie value not Jsessionid, but session, cookies should also use "session" as the identifier.
Similarly: if you save the session in other ways, you need to pay attention to the sessionid name value can not be written dead, according to the value of the response, determine the session identifier
Thank you for reading, the above is "session acquisition is empty exception how to deal with" the content, after the study of this article, I believe we have a deeper understanding of how to deal with this problem session acquisition is empty exception, the specific use of the situation also needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.