Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Q. HttpSession object

 
Karin Paola Illuminate
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Book : Java 2 Web Component Developer [Levi, Sybex]
An HttpSession object is created when a user sends its first request
to an application. The object is maintained on the server end and can be
configured to track each action the user takes while at the site. Remember,
with HTTP, each request/response transaction creates a new object.
Q. I don't understand the "remember"-part of this piece of text. Will an object be created each time you send a request / respond? Or will only one be created (the first time the user sends its first request)?
 
Andy Bowes
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remember, with HTTP, each request/response transaction creates a new object.
Q. I don't understand the "remember"-part of this piece of text. Will an object be created each time you send a request / respond? Or will only one be created (the first time the user sends its first request)?[/QB]

The way I read it is that a new Request & Response object will be created for each HTTP request therefore any attributes that you assign to these objects will NOT be persisted between requests.
 
yogen joshi
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you are right Andy. It refers to the creation of new request - responce object, for each new request, the session remaining the same.
yogen
 
Karin Paola Illuminate
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys. It is clear to me.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic