Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

A client sends requests to two different web components. Both of the components access the session. Will they end up using the same session object or different session ?

0 Answers  


What exactly are the functions of servlet?

0 Answers  


What is Difference between JavaBeans and taglib directives?

3 Answers  


how can we create object to a class in a jsp file?

5 Answers   Accenture, L&T, TCS,


What is URL Encoding?

0 Answers  


Is tomcat a servlet container?

0 Answers  


Difference between doget and dopost?

0 Answers  


How many objects of a servlet is created?

0 Answers  


My Question is that i am using <image> tag in my servlet and after compilation after that calling by url in my browser then images are not showing. Sometime images are showing and sometime is not showing. I am using Tomcat to run my servlets. Tell me if there any specification for image in servlets or what is solution for this ??

2 Answers  


Which exception is thrown if the servlet is not initialized properly?

0 Answers  


What is the process to implement doget and dopost methods?

0 Answers  


What are the key methods that are involved in processing of http servlets?

0 Answers  


Categories