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
How do you identify independent and dependent variables?
How many bits is a word?
What is the difference between normal report & matrix report?
Assume a thread has lock on it, calling sleep() method on that thread will release the lock?
What is difference between array and vector?
Explain numeric promotion?
What is the use of toarray () in java?
What are the three parts of a lambda expression? What is the type of lambda expression?
Is Java a dying language?
Which list is sorted in java?
What kind of variables a class can consist of?
What is identifier in java?
What is quick sort in java?
What is javac used for?
What about abstract classes in java?