can i call init() method in destroy() method of servlset. ?

Answers were Sorted based on User's Feedback



can i call init() method in destroy() method of servlset. ?..

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

can i call init() method in destroy() method of servlset. ?..

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

can i call init() method in destroy() method of servlset. ?..

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

can i call init() method in destroy() method of servlset. ?..

Answer / giridhar gangapatnam

I think it is not possible to call init() method from
destroy() method of servlet.

Is This Answer Correct ?    1 Yes 1 No

can i call init() method in destroy() method of servlset. ?..

Answer / jimmi prajapti

Yes We can Call init() method from destroy() of Servlet

Is This Answer Correct ?    5 Yes 7 No

Post New Answer

More Servlets Interview Questions

How servlet is created?

0 Answers  


What are the different mode that servlets can be used?

0 Answers  


What is the advantage of Servlets when compared with other server side technologies?

0 Answers  


What is session tracking?

0 Answers  


What is servlet looping or chaining?

0 Answers  






how the HTML data stored in web server?

0 Answers   TCS,


Hi Friends, Suppose you have a web appliction which consists of 100 clients are connected with Connection pooling and they are associated with 100 connection objcet and connected with DB sever,Due some problem DB-Server suddenly crashed and server came to down state for a while after few minutes DB-server once again up,Now how will I manage my Pool Management with my 100 clients...can any one tell me??????????????????

3 Answers   ProgressSoft,


Explain in brief the directory structure of a web application?

0 Answers  


What is webservlet?

0 Answers  


In howmany ways applet-servlet communication can be done?

1 Answers  


What are different types of Servlets?

12 Answers  


What is servlet interface?

0 Answers  


Categories