当前位置:网站首页>JSESSIONID description in cookie
JSESSIONID description in cookie
2022-07-30 20:51:00 【Bright de Xuan rice 61】
1) When you access the server for the first time, you will see the Set-Cookie information in the response header (this information will only appear in the response header when you access the server for the first time)

The picture above JSESSIONID=ghco9xdnaco31gmafukxchph;Path=/acr,
The browser will set the browser's cookie according to the set-cookie information in the response header and save it
Note that this cookie will be lost when the browser is closed because the cookie expiration date is not set.
2) When the request is made again (not the first request), the browser will send the cookie to the server in the request header (this is the case for every request)

(JSESSIONID=ghco9xdnaco31gmafukxchph)It is not difficult to find that the jsessionid of this is the same as the above jsessionid
We can also prove that our company also put the session id in the cookie, and you can see that the jsessionid is the same as the session id, as follows:

3) Why is this cookie sent on every request except the first request (in this case, the jsessionid to be exact)?
In fact, when a user accesses the server, a session will be opened for each user. How does the browser determine which user the session belongs to?The role of jsessionid is reflected: jsessionid is used to determine which session the current user corresponds to.In other words, the way for the server to identify the session is to tell the server where the client's session is in memory through jsessionid.
In fact jsessionid ==request.getSession().getId()
4) To sum up, the workflow of jsessionid can be simply represented by the following diagram:

边栏推荐
猜你喜欢

深度学习模型训练前的必做工作:总览模型信息

MySQL 高级(进阶) SQL 语句 (一)

MYSQL 唯一约束

Android Studio 实现登录注册-源代码 (连接MySql数据库)

深入浅出边缘云 | 3. 资源配置
![KEIL problem: [keil Error: failed to execute 'C:\Keil\ARM\ARMCC']](/img/24/762cec2b4495e80a3e45fac1fac13e.png)
KEIL problem: [keil Error: failed to execute 'C:\Keil\ARM\ARMCC']

HMS Core Discovery第16期回顾|与虎墩一起,玩转AI新“声”态

ceph的部署练习

Office365无法打开word文档怎么办?Office365无法打开word文档的解决方法

C language: detailed explanation of operators
随机推荐
Mysql 回表
MySQL----多表查询
Mysql——字符串函数
Recommendation System - Sorting Layer - Model (1): Embedding + MLP (Multilayer Perceptron) Model [Deep Crossing Model: Classic Embedding + MLP Model Structure]
Recommendation system-model: FNN model (FM+MLP=FNN)
《快速掌握QML》第六章 动画
R package调试
【Codeforces思维题】20220728
5分钟搞懂MySQL - 行转列
mysql 递归函数with recursive的用法
[Nuxt 3] (十三) Nuxt 是如何工作的?
18.客户端会话技术Cookie
@WebServlet注解(Servlet注解)
@Transactional注解在类上还是接口上使用,哪种方式更好?
在IDEA中使用JUnit4和JUnitGenerator V2.0自动生成测试模块
为什么那么多自学软件测试的人,后来都放弃了...
KingbaseES V8R6备份恢复案例之---同一数据库创建不同stanza备份
【软件工程之美 - 专栏笔记】31 | 软件测试要为产品质量负责吗?
js堆和栈
转义字符笔记记录