You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-users@mina.apache.org by Zubair Ahmed <zu...@yahoo.com> on 2011/09/16 14:09:54 UTC

problem running the embeddable server example

Hi,
I am trying to run the following code, whenever I point my browser to ftp://127.0.0.1/ , nothing happens and I don't even get a login dialogue. 
public class MainClass {	public static void main(String[] args) {		FtpServerFactory serverFactory = new FtpServerFactory();        PropertiesUserManagerFactory userManagerFactory = new PropertiesUserManagerFactory();        userManagerFactory.setFile(new File("res/users.properties"));        serverFactory.setUserManager(userManagerFactory.createUserManager());		FtpServer server = serverFactory.createServer(); 		try {			server.start();		} catch (FtpException e) {			e.printStackTrace();		}	}}
When I comment out the line "serverFactory.setUserManager(userManagerFactory.createUserManager()); " then I do get the login dialogue but fail to login using admin/admin. May be there is a problem loading the user.properties file, am I doing it correctly? . I have attached the log.
Thanks Zubair


*                       *

Re: problem running the embeddable server example

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Fri, Sep 16, 2011 at 2:09 PM, Zubair Ahmed <zu...@yahoo.com> wrote:
> I am trying to run the following code, whenever I point my browser to ftp://127.0.0.1/ , nothing happens and I don't even get a login dialogue.
> public class MainClass {
> public static void main(String[] args) {
> FtpServerFactory serverFactory = new FtpServerFactory();
>         PropertiesUserManagerFactory userManagerFactory = new PropertiesUserManagerFactory();
>         userManagerFactory.setFile(new File("res/users.properties"));
>         serverFactory.setUserManager(userManagerFactory.createUserManager());
> FtpServer server = serverFactory.createServer();
> try {
> server.start();
> } catch (FtpException e) {
> e.printStackTrace();
> }
> }
> }
> When I comment out the line "serverFactory.setUserManager(userManagerFactory.createUserManager()); " then I do get the login dialogue but fail to login using admin/admin. May be there is a problem loading the user.properties file, am I doing it correctly? . I have attached the log.

This list does not allow for attachments. Could you upload it
somewhere (e.g. gist.github.com) and send us the link?

/niklas