i was solving the problems of Head First chapter 6 questions, but one of the options does not seem to be right for me.
Head First is saying:
"Attributes bound into a session are available to any other servlet that belongs to the same ServletContext"
Well this seems to be as wrong statement, but may be I am missing something.
Please help me understand why this statement is right? According to me ServletContext's are not specific to session, and it should not be possible for a session
to reach to another session's attributes.
The statement means that attributes in a session are not available to any servlet outside the ServletContext. You are right that session attributes can't be inter-referenced between sessions. But the point is, if I set a session attribute in servlet1, then any other servlet (lets say servlet2) which gets called on the same session can access that attribute only if servlet1 and servlet2 are in same servlet context...