aspose file tools*
The moose likes Servlets and the fly likes Session data passed through header line or body ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session data passed through header line or body ?" Watch "Session data passed through header line or body ?" New topic
Author

Session data passed through header line or body ?

thomas davis
Ranch Hand

Joined: Feb 01, 2003
Posts: 207
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

Joined: May 21, 2003
Posts: 70
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

Joined: Feb 01, 2003
Posts: 207
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

Joined: Jan 10, 2002
Posts: 61226
    
  66

Session data stays on the server and is never passed to the client in either the header or the body.
hth,
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
wood burning stoves
 
subject: Session data passed through header line or body ?