当前位置:网站首页>Destroy the session and empty the specified attributes
Destroy the session and empty the specified attributes
2022-07-03 02:57:00 【A stream kite CD】
The destruction session:
session.invalidate()
Clear current session All the information about
Empty session Specified properties in :session.removeAttribute()
Applicable to clearing the specified attribute , Specified in parentheses session Properties of .
Empty session:Session.Clear()
Is to put Session All items in the object have been deleted ,Session There's nothing in the object . however Session The object remains .
session Of removeAttribute() and invalidate() The difference between
session.invalidate() Destroy the association with the user session, For example, some users force the browser to close , And tracking users' information session There is still , But the user has left .
although session Lifecycle browse default time 30 branch , But in 30 Within minutes, other users can also access the previous user's page , It is necessary to destroy the user's session.
session.removeAttribute() remove session An attribute in .
stay spring In the example, the login code of the pet store :
request.getSession().removeAttribute(“userSession”);
// Log off users , send session invalid .
request.getSession().invalidate();
边栏推荐
- Error invalid bound statement (not found): com ruoyi. stock. mapper. StockDetailMapper. XXXX solution
- [fluent] JSON model conversion (JSON serialization tool | JSON manual serialization | writing dart model classes according to JSON | online automatic conversion of dart classes according to JSON)
- 【Flutter】shared_ Preferences local storage (introduction | install the shared_preferences plug-in | use the shared_preferences process)
- Informatics Olympiad one general question bank 1006 a+b questions
- [principles of multithreading and high concurrency: 1_cpu multi-level cache model]
- Interview stereotyped version
- sql server 查询指定表的表结构
- Unity3d human skin real time rendering real simulated human skin real time rendering "suggestions collection"
- Process the dataset and use labelencoder to convert all IDs to start from 0
- 当lambda没有输入时,是何含义?
猜你喜欢
Kubernetes family container housekeeper pod online Q & A?
[fluent] listview list (map method description of list set | vertical list | horizontal list | code example)
函数栈帧的创建与销毁
【Flutter】shared_ Preferences local storage (introduction | install the shared_preferences plug-in | use the shared_preferences process)
SQL statement
Thunderbolt Chrome extension caused the data returned by the server JS parsing page data exception
[fluent] JSON model conversion (JSON serialization tool | JSON manual serialization | writing dart model classes according to JSON | online automatic conversion of dart classes according to JSON)
TCP 三次握手和四次挥手机制,TCP为什么要三次握手和四次挥手,TCP 连接建立失败处理机制
你真的懂继电器吗?
HW-初始准备
随机推荐
I2C subsystem (II): I3C spec
ASP. Net core 6 framework unveiling example demonstration [02]: application development based on routing, MVC and grpc
[shutter] monitor the transparency gradient of the scrolling action control component (remove the blank of the top status bar | frame layout component | transparency component | monitor the scrolling
Build a private cloud disk cloudrev
Three.js本地环境搭建
Concrete CMS vulnerability
How to limit the size of the dictionary- How to limit the size of a dictionary?
[fluent] listview list (map method description of list set | vertical list | horizontal list | code example)
I2C 子系统(四):I2C debug
C语言初阶-指针详解-庖丁解牛篇
Source code analysis | resource loading resources
Matlab tips (24) RBF, GRNN, PNN neural network
[shutter] setup of shutter development environment (supplement the latest information | the latest installation tutorial on August 25, 2021)
Linear rectification function relu and its variants in deep learning activation function
As a leader, how to control the code version and demand development when the epidemic comes| Community essay solicitation
SQL statement
Source code analysis | layout file loading process
Random Shuffle attention
Cron表达式介绍
What is the way out for children from poor families?