cancel
Showing results for 
Search instead for 
Did you mean: 

When the destroy method will call

Former Member
0 Kudos

Hi

I am using WAS to deploy the servlets.

I want to describe when the servlet method will be called in the servlet.

So I have to print the messge which in the Destroy method.

In the case of Tomcat i know how to print the message.

But I want to know in the Case of WAS.

thanks

kumar

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kumar,

The server calls a servlet's <b>destroy()</b> method when the servlet is about to be unloaded(e.g. because a new version should be loaded or the server is shutting down). In the <b>destroy()</b> method, a servlet should free any resources it has acquired that will not be garbage collected.The <b>destroy()</b> method also gives a servlet a chance to write out its unsaved cached information or any persistent information that should be read during the next call to init().

Regarding ur next doubt this will help u.

Regards,

Pooja.