aspose file tools*
The moose likes Servlets and the fly likes Scheduling execution of Servlets ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Scheduling execution of Servlets ?" Watch "Scheduling execution of Servlets ?" New topic
Author

Scheduling execution of Servlets ?

Kumar Navin
Ranch Hand

Joined: May 27, 2004
Posts: 52
Hi!
Is there a way to schedule the execution of a Servlet in an AS ? If yes, how to achieve this ?
Thanks,
-Navin.
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
As far as I know, No.
What you are trying to do? we might help you in acheiving your goal.
pradeep jaladi
Ranch Hand

Joined: Nov 21, 2004
Posts: 65
Hi Naveen,

Are you asking about any specific Tool like 'AS' or is it normal as

id it is normal as then their is not tool or class available until know .

If your application really need it then you can design one class using the thread concept and get the time and schedule your servlets.


Pradeep.Jaladi
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Kumar Navin:
Hi!
Is there a way to schedule the execution of a Servlet in an AS ? If yes, how to achieve this ?
Thanks,
-Navin.


What, exactly, do you mean by 'schedule execution'?
Servlets sit and wait for requests from clients (browsers) and send responses to them.

You can control the order in which they are initially loaded by using the load-on-startup tag within the servlet entry in web.xml.
Is that what you mean?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Kumar Navin
Ranch Hand

Joined: May 27, 2004
Posts: 52
Actually my task is to execute a logic daily at a particular time. Right now I have used a java Program and added it to the scheduler, which invokes the servlet daily.
Is there any other way to accomplish this.
Thanks.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

As a matter of fact.....
http://www.coderanch.com/t/359982/Servlets/java/Servlet-Timed-Reloading
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Scheduling execution of Servlets ?