can i call destroy() method in init() method of servlet
Answer Posted / tanuj
yes,
but genricServlet init() method initialization is different
from overriding it by you (we should not orride it).
destroy() method is used for closing many connections as
itit() method is used for starting some database and other
things.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is servlet and its advantages?
What is the major difference between servlet and applet?
Servlet is pure java object or not?
Differentiate between the print writer and servlet output stream?
Explain the role of dispatcherservlet and contextloaderlistener.
What are the different methods involved in the process of session management in servlets?
Explain the architechure of a servlet?
Why servlet is used as controller ? Not JSP? I want complete explation?
Is java servlet still used?
What are different ways for authentication of servlet?
How to read request headers from servlets?
How do you invoke a servelt?
How the typical servlet code look like ?
What is the difference between Difference between doGet() and doPost()?
What is difference between jsp and servlet?