nerdexam
Oracle

1Z0-899 · Question #104

A developer wants a web application to be notified when the application is about to be shut down. Which two actions are necessary to accomplish this goal? (Choose two.)

The correct answer is D. configure a listener in the application deployment descriptor, using the <listener> element E. include a class implementing ServletContextListener as part of the web application deployment. See the full explanation below for the reasoning.

Question

A developer wants a web application to be notified when the application is about to be shut down. Which two actions are necessary to accomplish this goal? (Choose two.)

Options

  • Ainclude a listener directive in a JSP page
  • Bconfigure a listener in the TLD file using the <listener> element
  • Cinclude a <servlet-destroy> element in the web application deployment descriptor
  • Dconfigure a listener in the application deployment descriptor, using the <listener> element
  • Einclude a class implementing ServletContextListener as part of the web application deployment
  • Finclude a class implementing ContextDestroyedListener as part of the web application deployment
  • Ginclude a class implementing HttpSessionAttributeListener as part of the web application deployment

How the community answered

(62 responses)
  • A
    2% (1)
  • B
    15% (9)
  • C
    6% (4)
  • D
    73% (45)
  • F
    2% (1)
  • G
    3% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-899 Practice