File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes HFS page274, question7 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "HFS page274, question7" Watch "HFS page274, question7" New topic
Author

HFS page274, question7

Jessica White
Ranch Hand

Joined: Sep 24, 2004
Posts: 30
Answer C is correct according to the book:
"Attributes bound into a session are available to any other servlet that belongs to the same ServletContext"

I have some doubt on this statement. There is one ServletContext per web app per JVM. So, "any other servlet that belongs to the same ServletContext" would mean all servlets in the same web app. It does not feel right all servlets have access to attributes bound to a particular session, does it? I feel it should be all servlets who participate in the same session would have access to attributes bound in that particular session.

Can anybody clear it up for me?
Thanks.
Kathy Sierra
Cowgirl and Author
Ranch Hand

Joined: Oct 10, 2002
Posts: 1572
You are absolutely right Jessica!

see this thread

cheers,
Kathy
Jessica White
Ranch Hand

Joined: Sep 24, 2004
Posts: 30
Thanks Kathy, that definitely clear it up!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HFS page274, question7
 
Similar Threads
HF Servlets & JSP - Sessions Question
SessionAttributes Doubt?
someone pls explain me this statement...
Attributes, Session and ServletContext
HFSJ mock Exam Doubt