Hi all

I need to put a program on the server that frequently get data from the web and update the database with these data and this program should do this automatically.

Can anyone put me on the Beginning of the road. I read in some websites about servlet context listener ... Is it what I need and if so how can I make it works on the server automatically.

regards

I once did this for a vote counting project on national elections. The users would send a SMS with a pre-established string format to a certain phone number, and a text file would be downloaded from the phone company owning the phone number receiving the SMSs to my server. The server would have a running program constantly processing the text file checking for new data entry, in which case it would update the database.

In your case, if I'm not mistaken, it's a similar case: you get data from the web, maybe it could update a text file or a separate database (which could contain some kind of sentinel variable, such as "checked" or something in a column of the table) which is constantly checked by the program running on the server. This program would then process the "unchecked" data in the file or database and add it along with the variables you need to insert to the database.

Hope this is of any help.

do you know what threads are?

Thank you guys for your response ..

Nichito you are right. I'm going to parse an xml of a weather web-site and get the the information like temperatures etc.. and update my database (mySQL in my case) so that I can analyze the temperatures and construct graphs ..etc

Stultuske do you mean by Thread the JAVA class that implements Runnable interface? or you mean threads in server context.
If you mean the Java class please direct me to the way that I can benefit from it in my case.

again thank you all

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.