Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session data passed through header line or body ?

 
thomas davis
Ranch Hand
Posts: 207
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. how does the data being passed while using session through body or request line?
2.session id created and passed through header. cookie= jsessionid =121sdsadasdasd
3.How data being identified or mapped with session id?
 
Dani Mazzuca
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I didn't understant the questions very well, however:
a) The data is sent from client --> Server, in the body or in the request line, according to the HTTP method used, i.e. GET = request_line, POST = body.
b) The attributes you add to the session are only stored in the server, in an instance of an object of HttpSession. The only data that is transferred from client to server is the session ID, that identifies the session/user and the HttpSession object stored for that session/client. This ID can be transferred as a Cookie (most common), or as part of the URL request (URL-rewritting).
Dani
 
thomas davis
Ranch Hand
Posts: 207
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
2)Session management
By default, session management is done using the cookie (session id), which is passed through the header line and is stored on the client machine. But how does the server identify and map the session data for a particular client to this session id?
What is the process for retrieving the data for the corresponding client? Is the data is also passes in header line or body?
How does the server handle the session in case of accessing the site by clicking on IE link from the desktop and opening a new window using ctrl+n?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64700
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Session data stays on the server and is never passed to the client in either the header or the body.
hth,
bear
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic