This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "FTP-Protocol: PORT question" Watch "FTP-Protocol: PORT question" New topic
Author

FTP-Protocol: PORT question

Anonymous
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,
Dennis
Joel Peach
Greenhorn

Joined: Oct 12, 2001
Posts: 19
Dennis,
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
http://www.faqs.org/rfcs/rfc959.html
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!
-Joel
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
Anonymous
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
Greenhorn

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

Joined: Oct 04, 2001
Posts: 41
Tom:
May I have a copy of your FTP code too? My email is jim20653@hotmail.com .
Thanks.
Jim
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