[英]How does HttpSession from javax.servlet.http.HttpServletRequest work
How is a session identified in a javax HttpSession ?如何在 javax HttpSession 中标识会话? Let's say I store something in a session.
假设我在会话中存储了一些东西。 Firstly how long will it stay there.
首先它会在那里停留多久。 I think I do not enter any timeout.
我想我没有进入任何超时。 So what will be default.
那么什么将是默认的。 And how is the session identified.
以及如何识别会话。 Is it by cookie ?
是通过 cookie 吗? What if I use multiple browsers.
如果我使用多个浏览器怎么办。 Will there be an own session for every single browser ?
每个浏览器都有自己的会话吗? So if I use Chrome for 5 minutes and store stuff in the session, then I use IE the session will be empty again ?
因此,如果我使用 Chrome 5 分钟并在会话中存储内容,那么我使用 IE 会话将再次为空?
Additionally I want to add , it seems if I shutdown the server the session automatically gets deleted, so session stuff seems only to be saved in RAM.另外我想补充一点,似乎如果我关闭服务器,会话会自动被删除,因此会话内容似乎只保存在 RAM 中。
Thanks for your help in advance.提前感谢您的帮助。
Normally session are identified with a cookie, so:通常会话是用 cookie 标识的,所以:
Finally, the default timeout depends on the server used, generally is 30 min.最后,默认超时时间取决于所使用的服务器,一般为 30 分钟。 The customization of the timeout depends, again, on the server used.
超时的自定义同样取决于所使用的服务器。 In tomcat/tomee for example you can change this value on application based (in the web.xml a deploy descriptor of java galaxy)
例如,在 tomcat/tomee 中,您可以基于应用程序更改此值(在 web.xml 中是 java Galaxy 的部署描述符)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.