top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How can I explicitly unload a servlet or call the destroy method?

+1 vote
335 views
How can I explicitly unload a servlet or call the destroy method?
posted Nov 24, 2015 by Joy Nelson

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

In general, you can’t. The Servlet API does not specify when a servlet is unloaded or how the destroy method is called. Your servlet engine (ie the implementation of the interfaces in the JSDK) might provide a way to do this, probably through its administration interface/tool (like Webshpere or JWS). Most servlet engines will also destroy and reload your servlet if they see that the class file(s) have been modified.

answer Nov 25, 2015 by Karthick.c
...