Is it possible to configure web.xml to reload a specific tomcat webapp at a particular time automatically. If not, is it possible to do this programatically?
Asked
Active
Viewed 658 times
1 Answers
4
Programatically - an option is to write an Ant script for reload the webapp you want based on the example given on the Tomcat docs
So you'll be left with a command like
ant -Dpassword=secret reload
and put this into a cron tab on your server (if Unix/Linux) or Windows Task Scheduler for windows.
I notice you've tagged your question garbage-collection
. If you are redeploying the web app due to excessive GC, then its better to tackle the root cause of the issue since this reload is only a workaround.
Run a profiler to identify memory leaks.
Related Reading on Memory Issues / GC
When log shows a lot of GC hits, what code change shall we need?
-
1Points for mentioning that the problem is to be solved somewhere else. Keeping reloading it makes no sense. – BalusC Aug 05 '10 at 11:38