Subramanya Sastry wrote:

Hello,

I am developing a Java web application, and one of the requirements is to run a particular servlet periodically, or even at specified times. Resin provides this ability via its "run-at" configuration element for servlets in web.xml

Example Resin configuration:
  <servlet>
     <servlet-name>download</servlet-name>
     <servlet-class>DownloadNewsServlet</servlet-class>
     <run-at period='360m'/>
  </servlet>

However, I haven't found an equivalent configuration for Tomcat. I searched
the web and was unsuccessful. So, any pointers as to how I could achieve this
for Tomcat would be appreciated.



There is none and shouldn't be any. I understand the need to run periodical tasks, but J2EE specification, prior to 1.4 has no such provisions. Further, Servlet/JSP specification has no such provision, even in J2EE 1.4. You'd be best advised to setup a cron-job to perform this periodic activity. There are several good HTTP client packages out there, Jakarta-Commons HTTPclient, to name one, that will help you in building the client side of your cron-job.


Nix.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to