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 do you mean by chaining in servlet?

576


What is servlet container. how it works?

615


What are the functions of the servlet container?

1038


How can you run a servlet program?

601


If some new data has entered the database, explain how can a servlet refresh automatically?

739






What do you mean by filter in servlet?

538


Define declaration.

618


How httpservlet is different from the genericservlet?

566


What is a web application and what is it’s directory structure?

585


Tell the new features added in servletrequest interface i.e. Servlet 2.4

574


Differentiate between the get and post method

565


what do you understand by url rewriting?

548


What do you mean by web applications? Explain web application directory arrangement?

540


What is servlet and how it works?

508


Is that servlet is pure java object or not?

644