• Post Reply Bookmark Topic Watch Topic
  • New Topic

Quick HttpSession question...  RSS feed

 
Chris Stewart
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you create a session and add an attribute to the session, is a separate session created for each user or is that something needed to be done manually on the part of the developer?

Each time a user logs in, does the server create a new session or write over the current session?
 
Nijeesh Balan
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Automatic !! fortunately nothing from the developer's end..
Thanks & Regards,
Nijeesh.
 
Mike DeStefano
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Every open internet browser window is considered a session. When you add an attribute to an HttpSession object, it will be on a per user per screen basis. You do not have to do this manually.
The application scope (the servlet context) is shared by all users. The session scope is per indivudual user and screen (sort-o-say) and not shared.
Scope can be a bit confusing at first. but there are a lot of good references on the internet to it. Hope this helps in some way.
 
Chris Stewart
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank god!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!