Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where do Session objects live??? Server or Client??

 
Sajee Joseph
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
Ive got a simple question.
Where do Session objects live??? Server or Client??
Thanks,
Saj
 
abhay kulkarni
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Session objects always reside on the server.
 
Benny Tang
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I remember that the session objects are reside on the server-side and the client stores the sessionID, which is used to associate with any session-related information, in the in-memory cookie of the browser.
Benny T
 
JavaHunk
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, u create a Http Session object in the server, but in turn
the Server send a Cookie to the Client with a
small information about the Session such as session ID.
Therefore every time user requests a page to view, the Cookie
info goes along with the request and the Server reads the Cookie
and identifies the current Session. If Cookie is disabled in
your browser, Session will not work though it is created in the Server
side.
Regards
JavaHunk
 
Malhar Barai
Author
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by JavaHunk:
If Cookie is disabled in your browser, Session will not work though it is created in the Server side.


Wont URL re-writing do the trick for you...??
This might help.
hth
MB
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
True, session rewriting will help. It may also be worth noting that session cookies are typically resident in memory only and disappear when the browser is closed, but they don't have to be
"JavaHunk",
we're light on rules here at the 'Ranch, but two that we quite strict about are our 'be nice' and naming policies.
Unfortunately your display name is not valid. We require your display name to be two words: Your first name, a space then your last name. Fictitious names are not allowed.
Please edit your profile so that you have a valid display name. Accounts with invalid display names get deleted
thanks,
Dave.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic