When the methods init() and Distroy() will be called?
Answer Posted / tulasi vani
The servlet life cycle included init() and destroy()(Small
d).
init() is called at the beginning of the servlet,it
performs certain one time activities which are required
during the lifetime of the servlet.It may be some
initialisation of variables or a database connection.
destroy() is called to destroy the servlet.Various
resources which are held by the servlet will be
released,database connections which were opened will be
closed.Later the servlet is destroyed.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What exception should be thrown when servlet is not properly initialized?
What is the purpose of inter-servlet communication?
Difference between GET and POST?
What are the kinds of http requests?
What is SingleThreadModel interface?
What’s the difference between sendredirect and forward methods
What are the functions of an intercepting filter?
Explain is servlet mapping?
What is the use of servlet context?
What is cookie in servlet?
What exactly is a servlet?
When Servlet is unloaded?
What is lazy loading and what is Generic Servlet Class?
Which is better jsp or servlet?
Which method of the httpservletrequest object is used?