Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP Applet

Status
Not open for further replies.

modalman

Programmer
Feb 14, 2001
156
GB
Hi. I'm writing an applet that uses the sockets class to ftp through the browser. At the moment I can connect to the server with a socket set to port 21. However when I create a socket to point to port 20 for the data transfer it throws an error. I'm using:

port20Socket=new Socket(hostaddress,20);

I also send a PORT command after this telling the server the local address & port of this socket. I dont know too much about ftp. Could someone point me in the right direction. Many thanks in advance. ASCII silly question, get a silly ANSI
 
Well, you are trying to open another port to do the transfer, that is the problem. The server is not listening on port 20. You need to do the transfer through port 21. I'd suggest that you download the RFC for FTP and read through it.
 
Thanks meadandale. Just one silly question. Whats an RFC and where do I download it from? Thanks in advance. ASCII silly question, get a silly ANSI
 
RFC stands for "Released For Comments" and basically relates to any draft documentation that is released prior to an official release of doucmnetation, such as with technical standards.

It is effectively the documentation version of a beta release.

Try here

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top