• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

An SCWCD mock exam question.

 
Hai Lin
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

Problem:
Which of the following is a technique used for maintaining sessions?

Options Select 1 correct option.

A. HttpSession objects
B. URL rewriting
C. Cookies
D. HttpSessionActivationListener
E. Hidden form fields

The answer it says is "D", I cannot understand, I think B,C E should be fine, in any case, how come "D" is right?

Thanks a lot for solving my puzzle.

Hai
 
chandana sapparapu
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
I have looked up the specs after seeing your question. From the options, it is clear that A,B,C & E qualify for enabling sessions. However the question is about MAINTAINING, not enabling.. So, D is the correct solution.

Here is the spec:

SRV.15.1.8 HttpSessionActivationListener
public interface HttpSessionActivationListener extends
java.util.EventListener
All Superinterfaces: java.util.EventListener
Objects that are bound to a session may listen to container events notifying them
that sessions will be passivated and that session will be activated. A container that
migrates session between VMs or persists sessions is required to notify all
attributes bound to sessions implementing HttpSessionActivationListener.
Since: 2.3

HTH.

Hi guys,

Problem:
Which of the following is a technique used for maintaining sessions?

Options Select 1 correct option.

A. HttpSession objects
B. URL rewriting
C. Cookies
D. HttpSessionActivationListener
E. Hidden form fields

The answer it says is "D", I cannot understand, I think B,C E should be fine, in any case, how come "D" is right?

Thanks a lot for solving my puzzle.

Hai
 
Hai Lin
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
chandana,
Greatly appreciate your detail reply.
Relly solve my question for the key part "Maintain".

Hai
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic