Can we call destroy() method inside the init() method? What
happens when we do so?

Answer Posted / srilatha

In the servlet life cycle First our request calls to the
init()method,Inside it will doing some operations related
to the objects after that it will cal the destory() method
The destory()removes the servlet object,before calling to
service() method.

Is This Answer Correct ?    2 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a generic servlet?

513


Which is better jsp or servlet?

545


What is meant by a web application

533


How to find whether a parameter exists in the request object?

657


When Servlet is unloaded?

620






What do you mean by cgi and what are its drawbacks?

521


what is the different between a servlet and a cgi? Why do you go for servlet rather than cgi?

567


What is the requirement of servlet config and servlet context implemented and how are they implemented?

532


What is the use of servlet context?

523


What are the life cycle methods of a servlet?

583


What is load-on-startup in servlet?

578


Whats the advantages using servlets over using CGI?

578


How forward () method is different from send redirect () method?

513


How can the session in servlet can be destroyed?

700


What do you mean by servlet?

711