In which cases Destroy() is invoked?
Answers were Sorted based on User's Feedback
Answer / n.l.narayana
destroy() method is invoked automatically when ever the
servlet object is removed from the webcontainer
(Tomcat,weblogic,....)
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / shakir khan
When server wants to remove the servlet from pool,it will
execute the destroy().
destroy() is invoked,when servlet is unloaded from
memory.This is a good place to clean up any resources(Such
as open files or database connections).
| Is This Answer Correct ? | 1 Yes | 0 No |
How ThreadSafe page attribute will be working in Servlet as well as in JSP?Automatically ThresdSafe is true in JSP so service method will be destroy in each and every request or not?so how thresd will handle srevice method?
Why filter is used in servlet?
How do you define a servlet?
How is the get () method different from the post() method?
What is the difference between servlet and filter?
What is the need of session tracking in HttpServlet ?
Which exception is thrown if the servlet is not initialized properly?
Why are servlets used?
What is the need of session tracking in web application?
What is servlet container. how it works?
Servlet is pure java object or not?
How the servlet is loaded?