wood burning stoves 2.0*
The moose likes Sockets and Internet Protocols and the fly likes FTP-Protocol: PORT question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "FTP-Protocol: PORT question" Watch "FTP-Protocol: PORT question" New topic

FTP-Protocol: PORT question

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
hi !
i'm currently trying to implement an applet-based ftp client.
i got it as far as i get ascii responses from the server, but when i say sth like "LIST", the server replies that he can't open the required connection.
are binaries and directory listings being transmitted via a different socket ??? does this have to do with the PORT command ??
thanks in advance,
Joel Peach

Joined: Oct 12, 2001
Posts: 19
This is absolutely the case! FTP employs two connections, a "control" connection which is the one that you have opened up. This is the initial connection used to send commands between the client and sever. The second connection is the "data" connection which, as the name implies, is where the data is piped.
If you haven't already, check out RFC 959
This is the FTP standard specification that will explain in detail (but is still quite readable for an RFC) how the FTP model functions.
Best of luck!
Tom Ben
Ranch Hand

Joined: Aug 17, 2001
Posts: 109
I have a working FTP package that is written in Java that I downloaded from the internet. It works great and saved me the time of having to do it myself. If you would like it just contact me with your email address and I will send it.

Sun Certified Programmer on the Java 2 Platform

Sun Certified Programmer on the Java 2 Platform
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
That would be wicked. Even though I'm doing it for my studies, it's good to have sth to compare to.
eMail: dennis.kuehn@gmx.net
thanks a lot, Tom.
suheel hussain

Joined: Nov 01, 2001
Posts: 16
Just what I was looking for! Could you give me the URL or
better send me the package @ suheelh@nc.rr.com. Would appreciate
Jim Wang
Ranch Hand

Joined: Oct 04, 2001
Posts: 41
May I have a copy of your FTP code too? My email is jim20653@hotmail.com .
Tom Ben
Ranch Hand

Joined: Aug 17, 2001
Posts: 109
Java Ftp Download
Hopes this helps everyone.
I agree. Here's the link: http://aspose.com/file-tools
subject: FTP-Protocol: PORT question
Similar Threads
Difference Between Internet and World Wide Web
error during FTP transfer: org apache commons net MalformedServerReplyException
help regarding ftp server ?
FTP Client
how to enable FTP ?