
GET and POST Requests
Question: How does a servlet handle GET and POST requests? Answer: The HttpServlet abstract class, defined in the javax.servlet.httppackage, contains several methods that simplify interacting with HTTPrequests. Two of the methods take care of handling GET and POSTrequests. When you write a servlet, you should subclass HttpServletand implement the doGet()