Skip to main content

ONJava.com -- How Servlet Containers Work

Popularity Report

Total Popularity Score: 0

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Rank

Bookmark History

Saved by 3 people (1 private), first by anonymouse user on 2006-08-24


Public Sticky notes

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()

Highlighted by ajinkya

This method is called only after all threads within the servlet's service method have exited or after a timeout period has passed

Highlighted by kenyth

  • 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.
  • Highlighted by kenyth