| Java Servlet Programming, 2nd Edition > B. HTTP Servlet API Quick Reference > HttpServlet | 
| 
 
 SynopsisClass Name: javax.servlet.http.HttpServlet Superclass: javax.servlet.GenericServlet Immediate Subclasses: None Interfaces Implemented: javax.servlet.Servlet, java.io.Serializable Availability: Servlet API 1.0 and later DescriptionHttpServlet is an abstract class that serves as the base class for HTTP (World Wide Web) servlets. The public service( ) method dispatches requests to an HTTP-specific, protected service( ) method, which then dispatches requests to particular handler functions for each HTTP submission type: doGet( ), doPost( ), and so on. Because the default HTTP servlet implementation handles dispatching to these methods, if you override the protected service( ) method, you must either handle the dispatching manually or not use the handler functions for HTTP request methods. Class Summarypublic abstract class HttpServlet extends javax.servlet.GenericServlet   implements javax.servlet.Servlet, java.io.Serializable {   // Constructors   public HttpServlet();   // Public instance method   public void service(ServletRequest req, ServletResponse res)     throws ServletException, IOException;   // Protected instance methods   protected void doDelete(HttpServletRequest req, HttpServletResponse res)     throws ServletException, IOException;                   // New in 2.0   protected void doGet(HttpServletRequest req, HttpServletResponse res)     throws ServletException, IOException;   protected void doOptions(HttpServletRequest req, HttpServletResponse res)     throws ServletException, IOException;                   // New in 2.0   protected void doPost(HttpServletRequest req,  HttpServletResponse res)     throws ServletException, IOException;   protected void doPut(HttpServletRequest req, HttpServletResponse res)     throws ServletException, IOException;                   // New in 2.0   protected void doTrace(HttpServletRequest req, HttpServletResponse res)     throws ServletException, IOException;                   // New in 2.0   protected long getLastModified(HttpServletRequest req);   protected void service(HttpServletRequest req, HttpServletResponse res)     throws ServletException, IOException; }ConstructorsHttpServlet()public HttpServlet() 
 Public Instance Methodsservice()public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException 
 Protected Instance MethodsdoDelete()protected void doDelete(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException 
 doGet()protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException 
 doOptions()protected void doOptions(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException 
 doPost()protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException 
 doPut()protected void doPut(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException 
 doTrace()protected void doTrace(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException 
 getLastModified()protected long getLastModified(HttpServletRequest req) 
 service()protected void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException 
 
 
 | 
