当前位置:网站首页>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();
边栏推荐
- 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?
- Use optimization | points that can be optimized in recyclerview
- The solution of "the required function is not supported" in win10 remote desktop connection is to modify the Registry [easy to understand]
- 左值右指解释的比较好的
- From C to capable -- use the pointer as a function parameter to find out whether the string is a palindrome character
- What does "where 1=1" mean
- docker安装mysql
- Xiaodi notes
- 一文带你了解 ZigBee
- Privatization lightweight continuous integration deployment scheme -- 01 environment configuration (Part 2)
猜你喜欢

超好用的日志库 logzero

一文带你了解 ZigBee

Distributed transaction
![[shutter] setup of shutter development environment (supplement the latest information | the latest installation tutorial on August 25, 2021)](/img/65/c1fe95f8c391394f7ff1b75c7d75b6.jpg)
[shutter] setup of shutter development environment (supplement the latest information | the latest installation tutorial on August 25, 2021)

Segmentation fault occurs during VFORK execution

The Linux server needs to install the agent software EPS (agent) database

"Analysis of 43 cases of MATLAB neural network": Chapter 43 efficient programming skills of neural network -- Discussion Based on the characteristics of the new version of MATLAB r2012b

内存泄漏工具VLD安装及使用

Creation and destruction of function stack frame

Build a private cloud disk cloudrev
随机推荐
Add some hard dishes to the interview: how to improve throughput and timeliness in delayed task scenarios!
[fluent] futurebuilder asynchronous programming (futurebuilder construction method | asyncsnapshot asynchronous calculation)
Segmentation fault occurs during VFORK execution
How do you adjust the scope of activerecord Association in rails 3- How do you scope ActiveRecord associations in Rails 3?
Global and Chinese ammonium dimolybdate market in-depth analysis and prospect risk prediction report 2022 Edition
[fluent] listview list (map method description of list set | vertical list | horizontal list | code example)
Process the dataset and use labelencoder to convert all IDs to start from 0
Super easy to use logzero
疫情当头,作为Leader如何进行代码版本和需求开发管控?| 社区征文
The difference between left value and right value in C language
Source code analysis | resource loading resources
I2C subsystem (I): I2C spec
函数栈帧的创建与销毁
ComponentScan和ComponentScans的区别
[shutter] setup of shutter development environment (supplement the latest information | the latest installation tutorial on August 25, 2021)
Classes and objects - initialization and cleanup of objects - constructor call rules
I2C 子系統(四):I2C debug
I2C 子系统(一):I2C spec
Pytest (6) -fixture (Firmware)
Add automatic model generation function to hade