which method is it legal to perform this operation?

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?

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?

A.
AsyncListner.oncomplete

B.
Servlet.init

C.
ServletContextListener.contextInitialize

D.
ServletrequestListener.contextInitialize



Leave a Reply 2

Your email address will not be published. Required fields are marked *


Allan Santos

Allan Santos

C.
Use the method “void contextInitialized(ServletContextEvent sce)” to get ServletContext and then use the addServlet method of the interface ServletContext.