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
What is servlet lazy loading?
Which http method is said to be non-idempotent and idempotent?
Can we use threads in Servlets?
What is the difference between the servlets and cgi programs?
What is servlet initializer?
What is difference between server and servlet?
Describe servlet?
Why is servlet used?
What’s the use of the servlet wrapper classes??
Write a simple servlet program to print the contents of html.
List some life cycle methods of a servlet.
How servlets are deployed in java?
What is Servlets and explain the advantages of Servlet life cycle?
What's the use of servletcontext?
What do you mean by url pattern in servlet?