Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

HF ch 6 Qn7

 
bernard savary
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer for Quetsion #7 in chapter 6 says that Attributes bound into a session are available to Any other servlet that belongs to same servletcontext . I think it is incorrect . It should have been same session instead of same servletcontext . Please correct me if I'm wrong .
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by bernard savary:
The answer for Quetsion #7 in chapter 6 says that Attributes bound into a session are available to Any other servlet that belongs to same servletcontext . I think it is incorrect . It should have been same session instead of same servletcontext . Please correct me if I'm wrong .

That's not what it says in my book.

The option says:
Attributes bound into a session are available to any other servlet that belongs to the same ServletContext and handles a request identified as being part of the same session.

The last part is important.
 
C.P Sanchalanam
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe the confusion is due to the missing text in the question # 7 on page 267. However, the answer to this question on page 274 shows the text correctly - "Attributes bound into a session are available to any other servlet that belongs to the same ServletContext".

~Sanchi
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's correct in both locations in my copy. Perhaps the original printing only has this errata.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!