Use of Servlet Container A Servlet Container is compiled - TopicsExpress



          

Use of Servlet Container A Servlet Container is compiled executable program, the contains the java servlets. The Container is responsible for loading, initializing, executing and destroying the servlets. When request comes the container maps the request to the servlet, it creates a new thread of the servlet, then the servlet process the request and return the response oject to the container and then container passes it to the server. You can say it makes an interface between the web server and the servlet. The Container does the following thing- When the request comes at first for the servlet, then it load the servlet, initialize it by calling servlet init() method. Makes a thread of the requested servlet Makes an instance of ServletRequest and ServletResponse of javax.servlet.*; package Passes the ServletRequest and ServletResponse reference variables to the servlet service method Take the ServletResponse object from the servlet and passes to the web server And finally destroy the reference variables and destroy the servlet when the is shut down.
Posted on: Sat, 12 Jul 2014 18:07:52 +0000

Trending Topics



Recently Viewed Topics




© 2015