nerdexam
Oracle

1Z0-899 · Question #3

A web application wants to register a new servlet at runtime using one of the servletContext.addServlet methods. In the implementation of which method is it legal to perform this operation?

The correct answer is C. ServletContextListener.contextInitialize. See the full explanation below for the reasoning.

Question

A web application wants to register a new servlet at runtime using one of the servletContext.addServlet methods. In the implementation of which method is it legal to perform this operation?

Options

  • AAsyncListner.oncomplete
  • BServlet.init
  • CServletContextListener.contextInitialize
  • DServletrequestListener.contextInitialize

How the community answered

(29 responses)
  • A
    3% (1)
  • B
    14% (4)
  • C
    76% (22)
  • D
    7% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-899 Practice