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 Java in General and the fly likes help regarding ftp server ? 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 » Java in General
Bookmark "help regarding ftp server ?" Watch "help regarding ftp server ?" New topic
Author

help regarding ftp server ?

naved momin
Ranch Hand

Joined: Jul 03, 2011
Posts: 692

i m trying to make an ftp server ..
a ftp server accepts a connection at some port say 7000 check for the user name and password ok fine till now
but if all is working well till now , but how the hell he sends the file to the client when client wants a particular file ?
even bigger question how the ftp server connects through port 21 for sending the files because port 21 is used for ftp in which case the ftpserver will throw an exception saying that port is already binded something like that
hope you got it what i am telling ?
if any one knows typical implementation of ftpserver please let me know
thanks


The Only way to learn is ...........do!
Visit my blog http://inaved-momin.blogspot.com/
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

naved momin wrote:i m trying to make an ftp server ..


You mean you're trying to write an FTP server in Java? Don't do that.

a ftp server accepts a connection at some port say 7000 check for the user name and password ok fine till now
but if all is working well till now , but how the hell he sends the file to the client when client wants a particular file ?
even bigger question how the ftp server connects through port 21 for sending the files because port 21 is used for ftp in which case the ftpserver will throw an exception saying that port is already binded something like that
hope you got it what i am telling ?


Yes. There is a specification for what FTP servers are supposed to do. Implementers should find that specification, read it, and understand it.

if any one knows typical implementation of ftpserver please let me know


The typical implementation of an FTP server these days is to get an FTP server from somewhere else and install it on the machine where it is supposed to run. I recommend you do that.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
As I've told you elsewhere, check out Apache Mina for an open source FTP server written in Java.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: help regarding ftp server ?