Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File upload to a Remote server

 
Sudhakar Krishnamurthy
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello:
Here's my problem:
I have a server A that has a file "A.txt" i need to send this file to a remote server B(on a different subnet but visible to server A) and store the result of this operation on server A.
How can i do this using servlets?
Any help is greatly appreciated.
cheers
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To tell if you can do this we need to know what (if any) services the destination machine offers. Does if have an FTP server running? NFS? SMB? Can you run a servlet on the destination machine to receive an upload?
How you transfer a file depends entirely on what software is running on the destination machine.
 
Sudhakar Krishnamurthy
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a web server that is running on the desitnation system and i have access to the remote system only through the web server so i cannot use services like ftp, rlogin. I do have a servlet that is running on the remote system.
Thanks
 
Sudhakar Krishnamurthy
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i do this without using RMI??
Any help is greatly appreciated.
-Sudhakar
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If all you want to do is to write some code which sends things to a servlet on a remote machine, you might as well use of the free APIs for that sort of thing. I usaully use httpunit - see this other recent thread for more details.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic