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.

This depends on how the browser does things. User sessions are maintained through either a cookie on the client system whose contents are enclosed with each HTTP request, or a URL parameter likewise included in each HTTP request. A second browser instance will not "know" about the cookie or URL parameter, respectively, and will not send it, thus it will not participate in the first browser instance's session(s).

--
Lew
.



Relevant Pages

  • Cookies Vs Sessions...?
    ... Can sessions work in the same way as my cookies? ... can seesions be set up to work accross browser sessions? ... The information contained in this e-mail message is intended only for ... If the reader of this message is not the intended recipient or an agent ...
    (php.general)
  • Re: Tabbed browsing in IE6 really sucks
    ... > I just had an IE6 browser crash because I switched to a new tab. ... > browser just disappeared but Ctrl-Alt-Del showed that the 4 sessions ... > browser and start several sessions in several tabs. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: ampersands in urls W3C validation problem
    ... >My website uses sessions and therefore sends PHPSessionID's throug the url ... >whenever a browser does not accept cookies. ...
    (alt.php)
  • Re: OnBeforeUnload Event
    ... Then you are depending on a bug in a browser. ... Real user friendly. ... Use sessions and timeouts of sessions - problem solved. ...
    (microsoft.public.scripting.jscript)
  • Re: Is there a Web enabled TN3270 on z/10s running z/OS 1.9
    ... you can access 3270 sessions via the browser. ... For IBM-MAIN subscribe / signoff / archive access instructions, ... send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO ...
    (bit.listserv.ibm-main)