s*******y 发帖数: 558 | 1 请问打开一个browser 是不是就算一个新的session叻
HttpSession session = response.getSession();
上面这条语句是不是每次打开一个新的browser就会生成一个
新的session, 而不能得到以前browser的信息?
有否可能 打开新的browser还是当前的session呢?
谢谢 |
m******t 发帖数: 2416 | 2
Usually, yes.
【在 s*******y 的大作中提到】 : 请问打开一个browser 是不是就算一个新的session叻 : HttpSession session = response.getSession(); : 上面这条语句是不是每次打开一个新的browser就会生成一个 : 新的session, 而不能得到以前browser的信息? : 有否可能 打开新的browser还是当前的session呢? : 谢谢
|
w******t 发帖数: 1422 | 3
^^^^^^^^^^^^^^^^^^
if you open your new browser by "ctl-N" - then it's same session,
o/w, you're right
【在 m******t 的大作中提到】 : : Usually, yes.
|
g*****g 发帖数: 34805 | 4 You can't, but you may use cookie to store some information that interests
you. Such as the user profile.
【在 s*******y 的大作中提到】 : 请问打开一个browser 是不是就算一个新的session叻 : HttpSession session = response.getSession(); : 上面这条语句是不是每次打开一个新的browser就会生成一个 : 新的session, 而不能得到以前browser的信息? : 有否可能 打开新的browser还是当前的session呢? : 谢谢
|
w******t 发帖数: 1422 | 5 his question is not that clear. if all he want to achieve is to make info
available for multiple sessions, try to save the info in app / context level.
(which makes me suspect that if that's really what he want, or maybe a
misunderstanding of the requirements?)
【在 g*****g 的大作中提到】 : You can't, but you may use cookie to store some information that interests : you. Such as the user profile.
|
m******t 发帖数: 2416 | 6
level.
IIUC, what he wants is something like the "Remember Me" thing on the login
screen we typically see. 8-) That can done by setting a persistent cookie.
【在 w******t 的大作中提到】 : his question is not that clear. if all he want to achieve is to make info : available for multiple sessions, try to save the info in app / context level. : (which makes me suspect that if that's really what he want, or maybe a : misunderstanding of the requirements?)
|