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 |
What is difference between PrintWriter and ServletOutputStream?
hi actully i hav form columns with origin and destination names .as like as i need to create one more column with name amount. my requirement is when i select origin and destination columns automatically i need to get amount from database.how can i. please tel me with relative code
Why servlet is mostly used?
What is servlet and list its types?
Write a servlet to upload file on server.
request parameter how to find whether a parameter exists in the request object?
what is the advantage of using Servlets over CGI programming?
List the Different types of servlet?
What are the exceptions thrown by servlets? Why?
how do you maintain sessions in servlets?
java.lang.IllegalArgumentException: The path of an ForwardConfig cannot be null while working with struts it displayed pls very ungent
Once the destroy() method is called by the container, will the servlet be immediately destroyed? What happens to the tasks(threads) that the servlet might be executing at that time?