This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
hi ranchers,, i created a simple Servlet and ran it on Apache Tomcat. This servlet reads an xml file from host url and stores data into DB, now my question is I want this servlet shuld be run after each 24 hrs on daily . i.e Say every night at 12:00 am my servlet revokes and parse xml file routine.
So what should i do, ? Is there any facility in Tomcat server which invoke specific servlet after fixed time of interval ??
You shouldn't use a servlet if you are not using it for HTTP access. If you want to run code periodically in a servlet container, use a javax.servlet.ServletContextListener in conjunction with a java.util.Timer and a java.util.TimerTask.