When the methods init() and Distroy() will be called?
Answer Posted / abhijitbaji
both init() and destroy() are called only once.
init() at the begining when servlet object is cerated.
destroy() when the servlet object is removed from server(at
shoutdown).
service() is called each time when request comes to servlet.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Who is responsible for writing a constructor?
What is the difference between CGI and Servlet?
How can you start a jta transaction from a servlet deployed on jboss?
Explain how does JSP handle run-time exceptions?
What is string tokenizer?
How do servlets work?
What is getservletcontext?
How can a servlet be used to generate plain text instead of html?
How do we call one servlet from another servlet?
What is the disadvantage of cookies?
Is servlet thread safe?
Where do you define dispatcherservlet?
What is the use of java servlet api?
How do you configure a centralized error handler in servlets?
What is servlet attributes and their scope?