Multiple choice technology databases

In order to use a servlet for handling the submission of a web form, subclass HttpServlet() and put service code in service() method

  1. doGet() or doPost() method

  2. getServletInfo() method

  3. All of the above

  4. none of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

To process form submissions in a servlet, you subclass HttpServlet and override the doGet() or doPost() methods, depending on the HTTP request method used. The service() method automatically dispatches requests to these methods, so developers rarely need to override service() directly.