Click to See Complete Forum and Search --> : Updating/ replacing a file on a webhost from a file generated from a java applicatio


kalxite
10-08-2008, 12:57 PM
Hi everyone,

not sure if this is the right place to ut this, if not my apologies

ok here goes

Here is a last attempt to get some help to my seemingly trivial problem, wish it was to me.
Ok here goes

I have developed a simple java desktop application which retrieves NMEA sentences from a simple GPS device.
The Java App interpretes the data and extracts The latitude and longitude coordinates and performs the necessary
conversion for use with google maps and stores it in a simple flat file with an appropriate data structure..

I have a simple website with the google maps embedded in it. i have split my html code in to 3 parts viz
The core Html
The Javascript and
The data ( to be read and displayed on google maps vis the java script)

To complete my intended functionality, i want to be able to click a button on my Java App which inturn updates/replaces the data file
on the server hosting my embedded google maps webpage with the data logged by my Java App since my Java App ensures data captured is in the required format.
As a result, once the map is invoked the new data is plotted on the embedded google maps on my webpage.

I have been able to achieve this locally (ie swapping data files and running the html file on my local machine), but not sure how to this over the network and uppdating
a file on s server hosting my webpage,

looking forward to some response

thanks

Khalid Ali
10-14-2008, 06:03 PM
if I understand your question correctly, then here it goes.
My understanding is you have your data file on a remote machine (where your web pages are hosted from).
tf that remote machine is not yours own sitting in the basement, then I am pretty sure they allow FTP to put files on their servers.
If thats correct too then all you need to do is write a module in your java app that uses ftp, logs in to remote host and replaces the existing file

kalxite
10-15-2008, 08:32 AM
Thanks khalid, just exactly what i want to do. However, if you could give me some examples or a relevant link which shows how to implement this, would be very usefull.
I initially intended to use Geocities for my project but im not sure if they provide such a facillity.
Any suggestions would be duely appreciated.

Thanks
K

Khalid Ali
10-15-2008, 03:32 PM
well first you have to ask your web hosting company to provide you with the ftp login (which, in all honesty, you should already have 1 since you do host your web pages there and they must have been transfered by some means).
Once you have the ftp login then you can write a small java class to put your files there.

Lets go in steps, get the ftp login to your web hosting company.