Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Applet with FTP

UmerSep 21 2013

Hi,

I am writing a java applet for an client. The applet will reside on the server and when a user will execute it, it will list the connected readers from the computer and will read it's smart card's data when he selects a reader from his choice. So far it is done. Now another portion of the work is that this data should be written on the FTP server in the form of a file. Now problem is applets executes on the client side and I have to have provide some mechanism by which i could write files on the FTP server. I am using the following code for this:

URL url = new URL("ftp://xyx.it:password@111.22.333.444/httpdocs/abc_direc/test.txt1;type=i");
URLConnection urlconnection = url.openConnection();
OutputStream outputstreamObj = urlconnection.getOutputStream(); 
String datatoWrite= "Texting strings to write";
outputstreamObj.write(datatoWrite.getBytes());
outputstreamObj.close();

Code the working fine but as you can see i have to provide FTP credentials into the code. Now my client is asking that how I will change it when later if he needed and 2ndly if I will provide a file to put credentials information then he has security concerns that it can be read by someone.

Here I am asking your experts suggestions that how should i do it so that both concerns of my client that is:

1. changing credentials (FTP address,username & password) later on without recompiling the code

2. Security concerns

can be fulfilled.

Many Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 19 2013
Added on Sep 21 2013
0 comments
236 views