Hi all, I am going to write an application, which will transfer pdf files from a server and saves them to a client. This application will be scheduled to start periodically. At the begining I thought to use a client application using URL calling a servlet to the server, but I'm not so happy for that kind of solution. Does anybody has any advice as to do using RMI , or any other solution client server ? thanks in advance, ciao!
edi<br />SCJP, SCWCD, SCBCD,(SCEA... project to submit)
posted 13 years ago
Hi Edi, Possible scenarios and protocols : 1- Samba Protocol If the client and the server belong to the same IP broadcast domain, then the simplest solution would be this one : ----> Server side Run a Samba server on one machine, and share/advertise the folder that contains the PDF files ----> Client side mount/map this folder on the client filesystem. The mounted folder, would appear to the client as any other folder on the local machine, and can be accessed using java.io APIs. 2- HTTP protocol ---->Server Side : run a HTTP server where you would put your pdf files ---->Client Side : use the java.net.HttpURLConnection + java.io streams to download the files by specifying there URLs The advantage of these 2 solutions with respect to RMI, is that you have to implement only the client side. The HTTP client that you would write for the HTTP server, would be the same as the one that you would write for the servlet. However, I don't see any need for servlets here, since a basic HTTP server is able to identify and upload files. Regards