is that possible to download a file from FTP using java client. i have tried access servlet via java client. i am not sure about FTP site, any insight on this highly appreciated!
Hi Joe and Ulf, as you mentioned, i could directly refer the file and download. Is it possible to log into ftp site and based on the folder name provided, can i browse and get the files in that folder?
If you use the Jakarta Commons Net package Ulf mentioned, there's methods in the FTP client object to list the contents of a directory. With the URL-based method, you simply request the directory rather than a particular file. The convenient thing about the Net package is that they do the parsing of the directory information for you. With the URL-based method you get a text listing of the directory and you have to parse out the file names.
Mathias Nilsson
Ranch Hand
Joined: Aug 21, 2004
Posts: 367
posted
0
I Can't get jakarta commons to work true proxy and nat
Since the Net project uses java.net.Socket under the covers, you have to set up the Socket settings. If the proxy you are using is a SOCKS4 or SOCKS5 proxy, you can set the following System Properties: