Skip to main content

Close
Get the best research tool on the web today,and free!
Connect with people with common interests!

saved byMyer on 2006-08-24

  • The Servlet interface has five methods, whose signatures are as
    follows:





    • public void init(ServletConfig config) throws ServletException


    • public void service(ServletRequest request, ServletResponse response)
      throws ServletException, java.io.IOException


    • public void destroy()


    • public ServletConfig getServletConfig()


    • public java.lang.String getServletInfo()
  • This method is called only after all threads within the servlet's
    service method have exited or after a timeout period has passed
    • When the servlet is called for the first time, load the servlet class and
      call its init method (once only).


    • For each request, construct an instance of
      javax.servlet.ServletRequest and an instance of
      javax.servlet.ServletResponse.


    • Invoke the servlet's service method, passing the
      ServletRequest and ServletResponse objects.


    • When the servlet class is shut down, call the servlet's
      destroy method and unload the servlet class.