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 are the jobs performed by servlets?
How can we achieve transport layer security for our web application?
What is servlet and list its types?
When servlet is loaded?
What is the structure of the http response
What's the servlet interface?
Explain the war file?
Where do you define dispatcherservlet?
How servlet is created?
Why don't we write a constructor in a servlet?
What is servlet and how it works?
How do you get the ip address of the client in servlet?
How do you design microservices?
What do you mean by filter in servlet?
What are the key methods that are involved in processing of http servlets?