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..
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).