nerdexam
GIAC

GSNA · Question #172

Which of the following listeners need not be configured in the deployment descriptor? (Choose two)

The correct answer is A. HttpSessionBindingListener D. HttpSessionActivationListener. Except for the HttpSessionActivationListener and the HttpSessionBindingListener, all other listeners must be configured in the deployment descriptor. HttpSessionBindingListener has methods that notify the object when it is added to or removed from a session. It has methods that…

Database & Application Auditing

Question

Which of the following listeners need not be configured in the deployment descriptor? (Choose two)

Options

  • AHttpSessionBindingListener
  • BHttpSessionAttributeListener
  • CHttpSessionListener
  • DHttpSessionActivationListener

How the community answered

(34 responses)
  • A
    79% (27)
  • B
    9% (3)
  • C
    12% (4)

Explanation

Except for the HttpSessionActivationListener and the HttpSessionBindingListener, all other listeners must be configured in the deployment descriptor. HttpSessionBindingListener has methods that notify the object when it is added to or removed from a session. It has methods that informs the attributes when the session is about to be activated or passivated. These methods are related to the attributes and not to the complete session. Hence, the container takes care of them and need not be configured in the deployment

Topics

#HttpSession listeners#deployment descriptor#Java servlet#session management

Community Discussion

No community discussion yet for this question.

Full GSNA Practice