can i call destroy() method in init() method of servlet

Answer Posted / yathirajulu

yes, we call destroy() in init(),because both are called once.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a servlet-to-servlet communcation?

648


What are the uses of servlets?

621


Why servlet is faster than jsp?

562


Write a command to get actual path of a servlet to the server?

541


Can you call a jsp from the servlet?

546






Write a hello world program using servlets.

590


How is an application exception handling is done using a servlet?

539


What do you mean by singlethreadmodel interface?

578


How can we refresh automatically when new data is entered into the database?

595


I have a requirement Here we have a ResultSet object that will contain 50 records i need to print those recors in to a webpage(i.e; view according to MVC architectures that mybe servlet or jsp) . Here i need to print the records 10 per page that is 1 to 10 in page one and 11 to 20 in page two like remaining will be appeared in other pages we need to display those page numbers whenever we click on that page number we will go to that page and display 10 records like we will display 5 pages it is like this << 1 2 3 4 5 next >>

2532


How many objects of a servlet is created?

790


What is the use of httpservletrequestwrapper and httpservletresponsewrapper?

540


Explain is servlet mapping?

580


What is a cookie What is the difference between session and cookie

592


What are the types of protocols supported by httpservlet ?

706