Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Doubt in session handling

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ranchers,
on page 199,HFSJ,it is mentioned that the client can open a new browser window and the container can use the same session for the request from this new browser window.
So that means that the session cookie which was stored on the first browser,will be used by all the subsequent browsers requests?
and the cookie will be killed only when all the instances of the browsers will be closed?(since I think the cookie will be killed when we close the browser,in case of single instance of browser making the request).
Could someone clarify how the browsers haldle with the session cookie.

Thanks,

Nitin
SCJP(91%).
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good question!

I have found this fact in my work.
In IE, we can use Ctrl+ N to open a new window, and the new window will keep the same session.
But It seems that FireFox does not work like this.

BTW,I think we should do some research about the difference of Tab and Window.

Hope to get more infomations.
 
Nitin Vashishtha
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply Wang.
You are correct,it keeps the same session if we open a new window using ctrl+N,but if we open a new window from outside,it wont keep the cookie information,and that request will not be treated as a part of the session.
Also,in case of URL Rewriting,even if we open a new window from outside ,and we copy and paste the url from the main browser window,it will keep the session,since now we are passing the session-id information in the url itself.

Thanks,
Nitin

SCJP 91%
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic