Answer Posted / shaik baji
Servlet life cycle contains the following steps in it:
step 1: When the first request comes to the servlet, the
container will load the servlet if and only if the user is
not specified <load-on-startup> tag in web.xml
step 2: The container will instantiates the servlet
step 3: The container will invoke the init() method of the
servlet with the ServletConfig as a parameter
step 4: The container will create the thread for that
request and invokes the service() method
step 5: Once the service method execution is completed the
container will invoke the destroy() method to release the
Servlet object.
Step 6: The servlet will unloaded from container when the
web server or the web application is getting shutdown.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is valid keyword in java?
What is singleton pattern?
What is the arraylist in java?
How do you sort a set in java?
How does list work in java?
Can static methods be inherited?
Does it matter in what order catch statements for filenotfoundexception and ioexception are written?
What is method with example?
What are the 6 functions?
Explain method overloading?
What is difference between char array and string?
What is ternary operator in java?
How do I convert a numeric ip address like 192.18.97.39 into a hostname like java.sun.com?
What is java algorithm?
Can arraylist contain null values?