what happens if we wont use destroy()?

Answer Posted / qim2010

The destroy() method and other servlet lifecycle methods are called by the servlet container, so it would be a serious error if the servlet container did not call the destroy() method as it takes a servlet out of service. Normally your application code should not call servlet lifecycle methods. It is not advisable for your application code to call the destroy() method directly, it would be confusing and potentially destructive, so it is not a problem if your application does not call the method at all.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is servlet looping or chaining?

649


Can we get PrintWriter and ServletOutputStream both in a servlet?

650


Which is the methods of generated servlet?

675


What is the use of request dispatcher interface?

563


What is the inter-servlet communication?

694






Explain load on start-up and its importance?

592


Can filter be used as request or response?

540


What is new in ServletRequest interface ? (Servlet 2.4)

568


Is that servlet is pure java object or not?

636


What is meant by servlet? What are the parameters of the service method?

564


What are Servlets?

594


How printwriter is different from servletoutputstream?

573


what is servlet chaining?

618


What is servlet? Explain

577


What is the use of httpservletrequestwrapper and httpservletresponsewrapper?

536