Servlet Life Cycle:
init()
service()
destroy()
§ container load the servlet class.
§ Container Instantiate servlet. It runs the constructor. The constructor is default one given by compiler.
§ Container calls the init() method after Servlet Instance is created. It will be called only once in servlet lifecycle, must complete before container call the service().
§ Then container call the service() method.
§ [...]
Archive for November 20th, 2008
Servlet life cycle
Posted in Servlet on November 20, 2008 | Leave a Comment »
Web app Architecture
Posted in Servlet, tagged container on November 20, 2008 | Leave a Comment »
Container:
Container helps servlets.
It instantiate the servlet or make a thread to handle the request
It calls the servlet’s doGet() or doPost() method
It create HTTP request and response object to the servlet.
It manages the life cycle of servlet.
It finds the URL in DD to find the correct servlet for the request.
[...]