Answer Posted / veeraiah dasari
Servlet lifecycle consists of three stages
1)generation
2)Service to the client
3)death of servlet
1)Generation:This stage occurs when a client request comes
to the server,it immediately generates a servlet for that
particular client by calling init() method.This method can
be called only once in a servlet life cycle.
2)Service :After servlet has been created,it provides the
service to the particular client by calling service() method.
This can be called many times in a servlet lifecycle.
3)death of servlet:In this after completion of the service
to the client.it is the responsibility of the server to
destroy the servlet by calling destroy() method.This method
can be called only once in servlet life cycle.
| Is This Answer Correct ? | 18 Yes | 0 No |
Post New Answer View All Answers
How are filters?
What is servlet and its use?
Can we fetch the attributes related to a servlet on a different servlet?
Can servlet have a constructor ?
Is that servlet is pure java object or not?
What is the difference between servlet and filter?
How do you configure a centralized error handler in servlets?
What are the objects involved when a servlet receives a call from client?
How a servlet is unloaded?
explain the advantages of servlet life cycle?
What are the different methods of session management in servlets?
What is the use of httpservletrequestwrapper?
What are the types of protocols supported by httpservlet ?
What are the ways to handle multi-threading in servlets?
What are the disadvantages of storing session state in cookies?