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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by session? Tell me something about httpsession class?

605


Can we refresh servlet in client and server side automatically?

595


What are the difference between session and cookies in servlet? Explain

566


How servlets are deployed in java?

547


What are the different ways we can maintain state between requests?

580






What is the use of httpservletresponsewrapper?

537


What is difference between cookies and httpsession?

548


What do you understand by mime type?

564


Why doesn’t a servlet include main()?

563


Why do we have servlet filters?

606


What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?

569


What is webservlet?

539


What is the GenericServlet class?

604


Why are servlets used?

534


How do I use cookies to store session state on the client?

538