Discussion Locked

Destroy method in servlet

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
when will the destroy method of a servlet will called ? i want to call explicit what should i do?

3 replies

by okujava

the destroy method is called whenn the servlet is garbage collected (at servlet timeout or servlet engine shutdown). you may call it as well, but it won't "destroy" the servlet (you can't call garbage collector explicitly, you can only suggest it torun). if you like to destroy the servlet, set the timeout as low as needed.

This discussion is closed to new replies.