Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Reading the change of date

  Asked By: Cameron    Date: Mar 04    Category: Java    Views: 713

for my application,i am storing birthday dates of all of my customers.i want to tell "happy birthday" to them on respective dates.for that i have to see the change of date everyday and i have to cross check each and every day, then i have to send them.
this thing i am doing in JSP.so i need to get the change of date.it changes on every night 12pm. that one i have to know and i have to cross check it with the dates in database.
friends please tell me how to do this.how to get the change of date.



3 Answers Found

Answer #1    Answered By: Latoya Murray     Answered On: Mar 04

A question like this was asked 2-3 days ago. Maybe you can have a look at
archive and see what were the answers.

What you want to do, is so simple, using Java's threads. You can
'schedule' a 'Timer' to execute a 'TimerTask' at an specific 'Date' or
'Perdiod'. Or as some of friends mentioned, you can use off-the-shelf
frameworks for scheduling like Quartz.

Have a look these :

http://www.javapractices.com/Topic54.cjp (Simple)
www.onjava.com/pub/a/onjava/2004/03/10/quartz.html (Quartz)

Answer #2    Answered By: Shobhana R.     Answered On: Mar 04

this is not a good design to access DB directly via jsp  pages, ans your page will perform operations on demand

follow the discussion below, you might find somethign useful


Answer #3    Answered By: Carl Woods     Answered On: Mar 04

For this case, you can use Timer and TimerTask as well.

Didn't find what you were looking for? Find more on Reading the change of date Or get search suggestion and latest updates.