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

Answer Posted / ravikiran

a call to the destroy method will happen and the resources
will be released and the flow will continue as it is and
will throw an exception if the released resource is used
indie the service method call.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between servlet and jsp?

591


How the typical servlet code look like ?

629


Tell us something about servletcontext interface.

616


Can we use the constructor, instead of init(), to initialize servlet?

574


How can you create a session in servlet?

585






What is the difference between forward () and sendredirect () functions in servlet? Explain

539


What are the types of Session Tracking ?

636


When Servlet is unloaded?

619


What are the benefits of using servlet over cgi?

566


Define the lifecycle for executing a jsp page.

584


When servlet is loaded?

583


What are the jobs performed by servlets?

574


How the servlet is loaded?

590


What is a deployment descriptor?

591


What is cgi?

592