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

Doubt in Session Attributes (HFSJ)

 
Harini Kaushik
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi All,

Am preparing for SCWCD Exam.
I have a doubt regarding one Session Attribute question in Mock Exam chapter6 of HFSJ.

Question : Which statements about Session Attributes are true?
Answer: ONe of the answer is "Attributes bound into session are available to any other servlet that belongs to same Servlet Context" -- Am pretty confused of this statement..

My doubt is
Servlet Context is for entire Web Application and Session Attributes are bound to particular session for a request..
Then how 'll it be accessible by (or available to) all other servlets in the Servlet Context?

Can any one clarify my doubt?
Appreciate any help..

Thanks,
Harini
 
Rob Spoor
Sheriff
Pie
Posts: 20751
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The same session can be used for requests to many servlets of your wep application. So if you first make a request to servlet A, and A sets a session attribute, that attribute is available for you if you then make a request to servlet B (provided the session hasn't timed out).
 
Harini Kaushik
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh yeah.. ok.. Thanks Rob
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic