can i call init() method in destroy() method of servlset. ?
Answers were Sorted based on User's Feedback
Answer / gayathri janarthanam
One can programatically call destroy() from init(), though it is not recommended. it will be invoked like a regular java method call..Whatever code is written in the destroy method will run....It will not destroy the servlet...Only the servlet container can call the destroy() method to actually destroy a servlet....
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / suresh
when the sevlet is load the class files,in this time to call
init() method is called
destroy method used to the servlet remove from the memory
| Is This Answer Correct ? | 6 Yes | 3 No |
Answer / arulmani
init()method will be called by the webcontainer with the
servlet object by passig the ServletConfig object,when the
servlet object will be created.
destroy()method will be called by the webcontainer when
servlet object will be destroyed
| Is This Answer Correct ? | 1 Yes | 0 No |
I think it is not possible to call init() method from
destroy() method of servlet.
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / jimmi prajapti
Yes We can Call init() method from destroy() of Servlet
| Is This Answer Correct ? | 5 Yes | 7 No |
What are the mechanisms used by a servlet container for maintaining session information?
we cant Override Jsp Service method?Why?
4 Answers Infrasoft, Mind Tree,
What are cookies and how will you use them?
How do you configure a centralized error handler in servlets?
Differentiate between the web server and application server?
java.lang.IllegalArgumentException: The path of an ForwardConfig cannot be null while working with struts it displayed pls very ungent
What is http servlet in java?
How to get the server information in a servlet?
In which cases Destroy() is invoked?
List the Different types of servlet?
Servlet Chaining? How do you do the Filtering in Servlets?
Is tomcat a servlet container?