I wrote a little code like this to start an ftp server embedded in my
application, but I found that anonymous user could not login. Client keeps
get 530.
Do I have add a configure file for ftp? I can not find any API to create a
User to add to UserManger.
private void start_ftp() throws FtpException {
FtpServerFactory serverFactory = new FtpServerFactory();
ListenerFactory factory = new ListenerFactory();
// set the port of the listener
factory.setPort(DEF_FTP_PORT);
// replace the default listener
serverFactory.addListener("default", factory.createListener());
Ftplet fl = new MyFtplet();
Map<String, Ftplet> map_ftplest = new LinkedHashMap<String,
Ftplet>();
map_ftplest.put("default", fl);
serverFactory.setFtplets(map_ftplest);
UserManagerFactory u_factory = new PropertiesUserManagerFactory();
UserManager u_manager = u_factory.createUserManager();
//u_manager.
Boolean b = u_manager.doesExist("anonymous");
serverFactory.setUserManager(u_manager);
// start the server
server = serverFactory.createServer();
server.start();
}
--
look to the things around you,the immediate world around you, if you are
alive,it will mean something to you ——Paul Strand