nerdexam
Oracle

1Z0-899 · Question #197

When using the @WebListener annotation, the class on which the annotation is applied to must also implement at least one o the following interfaces ?(Choose two):

The correct answer is C. ServletContextListener D. HttpSessionListener. The main task of the listener is to listen the particular events and process your own task on that event. For example, if you want to initialize a database connection before your application starts, ServletContextListener will be implemented to do that. Another good example is…

Servlets

Question

When using the @WebListener annotation, the class on which the annotation is applied to must also implement at least one o the following interfaces ?(Choose two):

Options

  • ARequestListener
  • BAttributeListener
  • CServletContextListener
  • DHttpSessionListener
  • ESessionAttributeListener
  • FAsyncListener

How the community answered

(59 responses)
  • A
    2% (1)
  • B
    3% (2)
  • C
    75% (44)
  • E
    14% (8)
  • F
    7% (4)

Explanation

The main task of the listener is to listen the particular events and process your own task on that event. For example, if you want to initialize a database connection before your application starts, ServletContextListener will be implemented to do that. Another good example is -when you want to do some task on the creation and destruction of a session. For this purpose you need to implement HttpSessionListener. Exam Questions, Study Guides, Practice Tests. Lead the way to help you pass any IT Certification exams, 100% Pass Guaranteed or Full Refund. Especially Cisco, CompTIA, Citrix, EMC, HP, Oracle, VMware, Juniper, Check Point, LPI, Nortel, EXIN and so on. Our Slogan: First Test, First Pass. Help you to pass any IT Certification exams at the first try. You can reach us at any of the email addresses listed below. Any problems about IT certification or our products, you could rely upon us, we will give you satisfactory answers in 24 hours.

Topics

#@WebListener#ServletContextListener#HttpSessionListener#listener interfaces

Community Discussion

No community discussion yet for this question.

Full 1Z0-899 Practice