What must be implemented by all Servlets?
-
Servlet Interface
-
servlet mapping
-
Servlet Container
-
None of the Above
All servlets must implement the javax.servlet.Servlet interface, either directly or by extending a class like GenericServlet or HttpServlet which already implements it. The Servlet interface defines the lifecycle methods (init, service, destroy) that all servlets must support.
Every Servlet class must implement the Servlet interface, either directly or indirectly through GenericServlet or HttpServlet. The interface defines the lifecycle methods (init, service, destroy) that the servlet container calls to manage the servlet. A servlet mapping and container are related infrastructure concepts, but they aren't something the servlet class itself implements.