correct answer-D
I think the most appropriate answer is C.
HttpSessionBindingListener helps the class to know when its objects are added or removed from session.
As,there is no mention of object replaced in the question.
----------------------------------------------------------------------------------------------
Q6. What is the purpose of session management?
A. To manage the user's login and logout activities.
B. To store information on the client-side between HTTP requests.
C. To store information on the server-side between HTTP requests.
Correct answer is C
As per my understanding the correct answer should be A,B.
The cookies are stored on client side and Server retrieves it after appending it to the request.
OCPJP 6.0 93 %
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2329
posted
0
As to #1, note that it says any object. It it had said "objects of that particular class" then HttpSessionBindingListener would have been a better answer.
As to #2, there isn't necessarily a relationship between session and cookies (sessions work just fine without cookies through URL rewriting). The storage takes place on the server, not the client.
Thanks Tim
But I am still not convinced with the explanation that you have given for the second question.
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2329
posted
0
How so? With respect to answer A, sessions don't have to be about login/logout at all; they're about a user visiting a web site - no login need be involved for that. Why do you think it might be about client-side storage? The cookie (if one is even involved) is not what "storage" means in this context.