Can we call destroy() method inside the init() method? What
happens when we do so?
Answer Posted / ashwin kumar j
Yes you can call a destroy() method in init() method, but
remember destroy() method will behave like normal method
but not as life-cycle method.
| Is This Answer Correct ? | 9 Yes | 3 No |
Post New Answer View All Answers
How to make sure a servlet is loaded at the application startup?
Should I override the service() method?
What is the requirement of servlet config and servlet context implemented and how are they implemented?
Define context initialization parameters.
How to upload a file to the server using servlet?
How can the session in servlet be destroyed?
What is life cycle of Servlet?
What is servlet and its life cycle?
Explain the servlet context.
How to get the IP address of client in servlet?
What is servlet interface?
Can we refresh servlet in client and server side automatically?
Explain servlet.
What is difference between get and post method?
What is a web application and what is it’s directory structure?