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 is the servlet?
How can the referrer and the target urls be used in servlet?
What is the servletconfig object?
What is the major difference between context parameter and context attribute?
How can we achieve transport layer security for our web application?
How the typical servlet code look like ?
What is servlet name in web xml?
What do you mean by cgi in servlet?
When jsessionid is created?
Can we fetch the attributes related to a servlet on a different servlet?
Explain servlet events?
What is the requirement of servlet config and servlet context implemented and how are they implemented?
What is called servlet container?
What must be implemented by all servlets?
How to make sure a servlet is loaded at the application startup?