Of late I have been working on a small project that some of us at work came up with. One of the requirements in that was to browse and download files over the network through the “famous” protocols : HTTP, FTP, etc. I turned to Apache for a client for the protocols. Its such a waste of time to reinvent the wheel.
For the interested, a good discussion on the various available ftp client libraries can be found on JavaWorld here.
For FTPing files I picked up the jakarta commons-netcomponent. It works fine for FTP sites within the same LAN or for an internet connection without a Proxy / firewall. However, the network I work in has a proxy server which allows FTP connections only through a HTTP tunnel. The FTP Client in commons-net does not support any form of proxy directly. It supports Socks and FTP proxy through the Java Networking API. (See the related discussion on the commons-user mailing list here.)
The problem has been discussed on the commons-user mailing list here and here.
I came up with the idea to tunnel the FTP request through jakarta commons-httpclient. Commons-httpclient works fine with proxy servers and http requests. But that too hit a roadblock (see the discussion on the httpclient-user mailing list here). Still working on it!
Will post any progress on this blog.
Discussion
No comments yet.