This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Hi all, I am posting this in this section, as I am not sure if this requirement could be achieved in JSP/Servlet. Please correct me if I am wrong. I'm developing a mini Course booking application using JSP-Servlet. One of the requirement is to automatically send out reminder to registered user with reminder of the training, say, a day prior to the training. All the information is kept in mySQL database. Basically, I need the application to check on a daily basis (from the database) and then sent out the email. The OS is Windows 2000 Server. Application Server is Tomcat 4.1. I know I could use the schedular in Windows to trigger the daily check. I'm very new to Java and not sure how to move into the next step. Could anyone please help. Thanks in Advance, TJ
Hi You can set the task in winows and generate one db class which will the make connection and retrive the result and other which we will send the email and call this class from class which is registered with task. Regards Prashant
It appears to me that you do know how to use Windows scheduler, but you dnon't know how to write the program to read the database and send out e-mails. One way to access mySql using Java is the use the JDBC library. For a good basic tutorial on how to use JDBC, check out the JDBC chapter in a book called Just Java. If you want a more hands-on example, download and install the mckoiDB database engine . It's free, small, and has some great sample code that should help you get up and running. 95% of the code that you should need to complete the db-related portion of your program should be included with that application. Now that you have the names, how are you going to e-mail them? Well, that has a lot to do with the e-mail application(s) that your company uses. There's a JavaMail library available, but it might not work in your system; check with your sysadmins to see what options are available. Also, I wouldn't recommend creating a JSP or servlet to accomplish your tasks. A simple, standalone Java program with a public "main" method is your best choice. HTH! [ August 07, 2003: Message edited by: Tom Purl ]