Hi. I'm trying to obtain data from a server.

First, a local server (an mbed. for more information, Rapid Prototyping for Microcontrollers | mbed ) written in C++ has


HTTPServer svr;
...
FSHandler::mount("/webfs", "/");
svr.addHandler<RPCHandler>("/rpc");
svr.addHandler<FSHandler>("/");


so that it continuously generates the data I want.

I would like to set up a Java servlet that takes the data automatically (eventually it will be a cron job).
If I do it from a simple web page using JavaScript, it's kinda easy.

var req = new XMLHttpRequest();
req.open("GET", "http://" + location.host + "/rpc/tmp/read", false);
req.send("");

location.host is of course, the IP address where the local server (mbed) is placed.

Could anyone give me some tips how to do it with Java?

If there is some security issue that concerns this development, please let me know (like, if the connection is open, anyone can hack in).

Thanks in advance.

soichi