File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes Applet needs access to files on ftp server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet needs access to files on ftp server " Watch "Applet needs access to files on ftp server " New topic

Applet needs access to files on ftp server

Piotr Nowak

Joined: May 01, 2012
Posts: 1


So I have an applet hosted on my webserver and I have three .xls files on the same ftp server as my app. I want my applet to have access to these files but am having major difficulties. Since the applet runs on the users computer my strategy was to let the user download the files to a specific directory and use that path in my html code for <PARAM NAME . I have been doing research on servlets and am wondering whether or not to configure my app to use some of the functionality. In summary my applet needs access to three files that are stored on the ftp server which are accessible via direct link as well. I would appreciate any help !

Piotr Nowak
Tim Moores

Joined: Sep 21, 2011
Posts: 2409
If the files are accessible via direct link (by which I assume you mean HTTP), you could just use HttpURLConnection to download them. of course, in order to be able to store them on the local file system, the applet would need to be signed.

If you want to use FTP - no big deal, either. Just ship the applet with the Apache Commons Net library, which has an FTP client built in.
I agree. Here's the link:
subject: Applet needs access to files on ftp server
It's not a secret anymore!