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


Please Help Members By Posting Answers For Below Questions

What is lazy loading and what is Generic Servlet Class?

607


How native code can be used in a servlet?

3518


How to get the server information in a servlet?

683


Explain the working of service() method of a servlet.

504


What is the difference between servlet and filter?

528






What is the difference between Difference between doGet() and doPost()?

754


Explain the servlet filter.

540


Difference between java beans & servlets?

588


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

2282


Which exception is thrown if the servlet is not initialized properly?

588


What are the difference between RMI and Servlets?

1049


What is getservletcontext?

548


What is the difference between Servlet Request and Servlet Context when calling a Request Dispatcher?

600


Given the request path below, which are context path, servlet path and path info?

543


What are the uses of servlets?

619