How do I wire up my web.xml to have a task happen every n many seconds. Moreover, I need to have a server method refresh every 5 seconds via a method call.
Much thanks in advance
SOLVED:
http://javaprogrammingtips4u.blogspot.com/2010/05/how-to-implement-task-scheduler-job.html
You can annotate the desired routine using
But in order to for Spring for find and recognize the annotation you must declare which base package the class
Foolies in as well as configure Spring to look for scheduling tasks. Put the following in your spring XML configuration (and don’t forget to import the XML namespacescontextandtask).Alternatively you can put @EnableScheduling before the class declaration and it does the XML config for you out of the box.
See also the context namespace and the task namespace.