There is a Tomcat web server, say WS1, on which I have all my servlets and HTML pages. A client of WS1 uploads a file on WS1. That file is then read, encrypted and stored on WS1 in some other folder.
What I have to do is send/transfer this encrypted file on some other machine, say machine A. Suppose client searches for the file he has stored, that file should be downloaded to WS1 from the machine A. WS1 will perform decryption and that decrypted file should be sent on the client.
I have completed upto the encryption part but got stuck with the file transfer. How can I achieve this?