🎴 Flashcard Mode

Java Servlets and Web Technologies Quiz

Card1 / 16
Mastered0
Review0
QuestionClick to flip

What are the ancillary methods of javax.servlet.Servlet interface?(Choose all that apply)

AnswerClick to flip back
A
getServletConfig()
B
getServletInfo()
💡 Explanation:

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()).

Change Mode