Re: concept of session in J2EE



vk02720@xxxxxxxxx wrote:
In a JSP/Servlet application, what exactly constitutes a user session?
If I have an application open and I open a new browser window at one
of the pages in the app would this create 2 sessions or still one?
Basically, I was trying to find out if I need to synchronize access to
any session variables in servlet code or that is not necessary.

That is up to the browser.

Let us assume sessions are maintained via cookies not URL
rewriting because cookies are by fat the most common.

When the session is established then the browser get a session
cookie from the server.

All requests coming with that session cookie belongs to that
session.

So it is up to the browser whether it will send the same
cookie for another window or not.

If I remember correct then IE and FF act differently regarding
this.

So be very conservative about what you assume.

Arne
.



Relevant Pages

  • Re: _SESSION weirdness behind a NAT firewall/router: bug?
    ... that the 'sess_deleted' file is actually being used as a session ID. ... force the cookie to expire. ... Any $_SESSION values introduced by one browser become part of the ... I re-load the non-logged-in index page in Opera. ...
    (comp.lang.php)
  • Re: php session without cookie useage
    ... >>> browser or the application to maintain the state if needed. ... >>> transfer a session key created on login to subsequent pages via a POST ... >>> browser via a cookie or via POST or GET. ... > That may block legitimate users using a round-robin proxy (different ...
    (comp.lang.php)
  • Re: Is Session Always Cleared?
    ... If the first user closes his browser after he is finished, the session cookie is forgotten. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Detecting loss of session
    ... > a request. ... From what I've read on session cookies ... > sending) them as soon as they expire, not when the browser is closed? ... If you don't set the expiration on a Cookie, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Cookies , Session Which is Better ? and Global.asa Question
    ... YOU SHOULD NEVER STORE PERSONALLY IDENTIFIABLE INFORMATION IN A ... If you needed to store personal information in a cookie use non ... impossible - its much harder for me to hijack session information from ... The average time a session lasts is 20 mins. So, when your browser ...
    (microsoft.public.inetserver.asp.general)