java保存值到session后为什么别的请求拿不到保存的值,同一个会话
大家讲道理
大家讲道理 2017-04-18 10:01:51
0
6
359
大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(6)
Ty80

1. Output the sessionID and see

2. Whether to use reverse proxy or something like that

伊谢尔伦

I guess, after all, I am not very good at Java

The session you obtained is o. What you return output is result. How come there is a value?

黄舟

The person above is right. Since you want to get the logged-in user, you can directly return to User and convert the obtained object

刘奇

Print the sessionId when requesting to check whether it is consistent. If they are inconsistent, it is possible that the browser has disabled cookies; if they are consistent, are they retrieved as mentioned above but not put into the result

Ty80

Correct answer to the 1st floor: You can go to the user in your session. Please interrupt and look at your object o

刘奇

It is possible that browser cookies are disabled

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template