🎴 Flashcard Mode
Java Servlets and Web Technologies Quiz
What are the ancillary methods of javax.servlet.Servlet interface?(Choose all that apply)
The Servlet interface has 5 methods: lifecycle methods (init, service, destroy) and ancillary methods (getServletConfig, getServletInfo). The question asks for ancillary methods - those NOT part of the core lifecycle. getServletConfig() returns the servlet's configuration object, and getServletInfo() returns descriptive information about the servlet. These are considered ancillary/support methods. Options A and B are lifecycle methods. Option C (getServletContext) returns the context but is NOT a method of Servlet interface - it's a method of ServletConfig interface (accessed via getServletConfig().getServletContext()).