tags:

views:

33

answers:

1

I am developing an Email client using Java Mail API. Now, to regularly check for New Mails, I want to call a page "Synchronize_update.jsp"

I have to do it through a JSP as I need to also execute a piece of JavaScript Code towards the end which is basically an AJAX Call to Notify_all_for_new_mail.jsp.

Can any one suggest me a solution? I am on a Linux Virtual server with command line full access.

A: 

You could use java.util.Timer and java.util.TimerTask classes if your scheduling is simple, or use Quartz scheduler if you wish to achieve cron like scheduling.

Here is example using Timer.

For emulating browser functionality in your code you can use HttpUnit.

I think using above tools you can achieve your functionality. Hope this helps.

YoK