can i call init() method in destroy() method of servlset. ?
Answer Posted / 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 |
Post New Answer View All Answers
What are its drawbacks of cgi?
What is the difference between forward () and sendredirect () functions in servlet? Explain
If a servlet is not properly initialized, what exception may be thrown?
How servlets are deployed in java?
Can we use threads in Servlets?
How do we go with database connection and log4j integration in servlet?
What do you mean by scope object and what are its types?
What is the difference between portlet and servlet?
Explain web application directory arrangement?
Explain the war file?
If some new data has entered the database, explain how can a servlet refresh automatically?
What are the life cycle methods of the servlet?
Why do we have servlet filters?
What are Servlets?
How will you pass values from HTML page to the servlet?