This content has been marked as final. Show 4 replies
1. Create the form in the jsp and a form handler to process this form, say InvokeSchedulerFormHandler.
2. Create a variable to refer to the scheduler.
// create getter and setter for this.
3.. Create a handle method, handleInvokeScheduler(). Do any validations if required.
4. After the validations, call getMyScheduler().doScheduledTask();
5. In the jsp, map the submit button to this handle method.
<dsp:input type="submit" bean="InvokeSchedulerFormHandler.invokeScheduler" value="Submit"/>
6. Create the .properties file to the form handler and to your scheduler.
(Am wondering about this requirement :) . If you can specify the reason, it will be helpful).
Hope this helps.
Keep posting the questions / updates.
To the extent of my knowledge, a scheduler, by definition is meant to run automatically as defined by the schedule property. So there is no direct way of running it thro a jsp.
If you want to test the scheduler by changing/setting a property, my suggestion would be to create a new property in the scheduler, set it thro dyn/admin , invoke doStopService follwed by doStartService afer specifying the schedule property to a convenient value (ex: every 5 minutes).