My task is to upload a file and save it to another system when the IP address and path were specified... Am using JSP language.. Till now I am able to save a file in my local system at a specified location..But I have got no clue how to save it to another system.. Help me..
My task is to upload a file to a server connected through LAN.
Client IP - x.x.x.a
Server IP - x.x.x.b
The file gets uploaded in server's mysql database succesfully. But I want it in a folder in server instead. I'm confused how to specify the destination path then. Except that part the code works well.
(Ppl whoever tries to execute the code dnt forget to include JAR file for mysql while executing)
Hearty thanks in advance for quick assistance.
Here is the code.
Author and all-around good cowpoke
Joined: Mar 22, 2000
File ff = new File("Destintion Path" + saveFile);
// What should be the path ("Destination Path") specification above
//for storing the file in server x.x.x.b
You simply can not do this - think what a security hole if you could arbitrarily address files on another IP address.
I say again - "You need to find out what the other system has available - FTP is commonly used for file transfer."
This will involve cooperating with the other system's security provisions.
Joined: Oct 10, 2011
Thank you william.
Am new to ftp. I came across few examples for transferring files using ftp and Java. I have a doubt how to set ftp username and password for the server. I searched in net but cant find exactly what I am looking for. Help me please.