Before CLient Request
1.Loading OF web.xml
1bLoading of
Servlet Class
2.Instantiation of Servlet Object (COnstructor)
3.Initalization of Servlet(init)
Q1.Does these 3 steps happen before the client request come i.e. the project is run on server (eg Tomcat server started in eclipse IDE) ?
AFter Client Request
The following steps are managed by Web Container:
4.COntainer created req and reponse objects
5.IT finds correct servlet based on client requests.
5.b calls init()---------------
6.Allocates
THread and Passes req,resp to THread
7.Calls Servlet service method
Q2.Does container call init (step 5b) here or before the client request i.e at the time of Loading ?