Tuesday, February 4, 2014

Servlet container model

  • Servlets are pure java code 
  • JSP contains HTML and small amount of java code 
  • Browser sends the request to the webserver 
  • Webserver hands the request to the servlet container 
  • Webserver checks the type of request 
  • If the request is coming from jsp it will be translated to servlet in the container 
  • Container loads the servlets if not already loaded 
  • Container hands the request object to init() ,the service() and last the destroy()
  • service() calles the appropriate doXXX() 
  • Container creates the HTTP response 
  • If Http response is fine it will send the http response or error response.

No comments: