Implementation of HttpServlet class

public abstract class HttpServlet extends GenericServlet
{
   public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException;
   {
                        HttpServletRequest req=(HttpServletRequest)request;
                   HttpServletResponse res=(HttpServletResponse)response;
                service(req,res);

   }
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;
 {
            // Request type is checked and doGet() and doPost() method are invoked.
       if(get())
       if(post())
       if((put())
       if((delete())
       if((head())
       if((trace())
       if((connect())
       if((options())
  }
}


1.2- public service(-,-) of HttpServlet is executed.
1.3- protected service(-,-) is invoked by public service().
1.4- protected service(-,-) of HttpServlet is executed.
1.5- request type is checked and doGet(-,-) is invoked by protected service().

Comments

Popular posts from this blog

ObjectAid UML Explorer for Eclipse

Login Authentication program (Demonstrate the use RequestDispatcher and its method such as include() and forward() )

Adapter Design Pattern