This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Session life cycle  RSS feed

 
chiu pong
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i want to ask a question about session.
when i use session.setAttribute() in page1.jsp on one broswer window, is it still valid on page2.jsp on different broswer window until the broswer window of page1.jsp is closed?
if so, does it mean i can use the session on any pages on any broswer window provided that the broswer window of page1.jsp is not closed?
thx for answering.
ypc
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37180
515
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it has to do with the browser and operating system. If the two windows are considered to be in the same process, they will share a session.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More to the point, if they share cookies they will share the session.
hth,
bear
 
Dana Hanna
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For Internet Explorer, the browser windows will share if one opens the other, or the user chooses "File", "New", "Window". If the user clicks the Internet Explorer icon again, than it will not share.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!