• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

An SCWCD mock exam question.

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
chandana,
Greatly appreciate your detail reply.
Relly solve my question for the key part "Maintain".

Hai
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic