can i call destroy() method in init() method of servlet
Answer Posted / deepesh
Yes, We can call destroy() from init() method but after
coming out from the destroy() it will again process the init
() method like the life cycle has to be. Thus we can not
control the servlet life cycle, though we can call destroy
() from init().
Thanks.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What are the functions of Servlet container?
Explain the role of dispatcherservlet and contextloaderlistener.
What are the steps involved in placing a servlet within a package?
How can you create a session in servlet?
What is the difference between jsp and servlet life cycle?
Why doesn’t a servlet include main()? How does it work?
What are the key methods that are involved in processing of http servlets?
Explain how does JSP handle run-time exceptions?
What is meant by servlet? What are the parameters of the service method?
What is meant by cookies?
What is the difference between Difference between doGet() and doPost()?
What are the uses of servlet and what is servlet chaining?
Explain request dispatcher and its methods.
Explain the custom jsp tags and the beans.
Can you send an authentication error from a servlet?