当前位置:网站首页>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();
边栏推荐
- Add automatic model generation function to hade
- 用docker 连接mysql的过程
- How to select the minimum and maximum values of columns in the data table- How to select min and max values of a column in a datatable?
- From C to capable -- use the pointer as a function parameter to find out whether the string is a palindrome character
- Super easy to use logzero
- Joking about Domain Driven Design (III) -- Dilemma
- Two dimensional format array format index subscript continuity problem leads to return JSON format problem
- Summary of interview project technology stack
- Pytest (6) -fixture (Firmware)
- Error invalid bound statement (not found): com ruoyi. stock. mapper. StockDetailMapper. XXXX solution
猜你喜欢

random shuffle注意

Kubernetes family container housekeeper pod online Q & A?

Random shuffle note

用docker 連接mysql的過程

Deep Reinforcement Learning for Intelligent Transportation Systems: A Survey 论文阅读笔记

Random Shuffle attention

Today, it's time to copy the bottom!

Build a private cloud disk cloudrev

random shuffle注意

Deep learning: multi-layer perceptron and XOR problem (pytoch Implementation)
随机推荐
Xiaodi notes
open file in 'w' mode: IOError: [Errno 2] No such file or directory
Kubernetes cluster log and efk architecture log scheme
C语言初阶-指针详解-庖丁解牛篇
疫情当头,作为Leader如何进行代码版本和需求开发管控?| 社区征文
HW initial preparation
The core idea of performance optimization, dry goods sharing
SQL Server Query spécifie la structure de la table
Informatics Olympiad one general question bank 1006 a+b questions
How to return ordered keys after counter counts the quantity
I2C subsystem (I): I2C spec
Global and Chinese ammonium dimolybdate market in-depth analysis and prospect risk prediction report 2022 Edition
I2C subsystem (IV): I2C debug
How to change the panet layer in yolov5 to bifpn
2022-2028 global splicing display industry research and trend analysis report
js根据树结构查找某个节点的下面的所有父节点或者子节点
Chart. JS multitooltip tag - chart js multiTooltip labels
Pytest (6) -fixture (Firmware)
Strategy application of Dameng database
Check log4j problems using stain analysis