Forums Register Login

destroy() method

+Pie Number of slices to send: Send
Hi,

1. Because destroy() is callback method which is called by Container when the server is about to shutdown, Do we need to override it (or) leave it to the container.
2. Even though I write couple of System.out.println() statements in destroy() method and shutdown the server, they are not printed on the console.

Please advice.
+Pie Number of slices to send: Send

Hi Hari,

As per my knowledge destroy() method is called before a Servlet gets unloaded from Container. though its upto container implementation on which other cases its provides callback to destroy() method.

Thanks
Javin
It means our mission is in jeapordy! Quick, read this tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1207 times.
Similar Threads
Servlet Lifecycle
When Servlet's delete() method is called?
destroying the servlet
Can i use finalize method instead of destroy in servlets
destroy() doubt
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 19:06:55.