John Race (BE/ETL) wrote:
I've tried setting the properties as you suggested but still not working. I'm 
probably doing something fundamentally wrong but don't know what. Here's my 
code:
Properties prop = new Properties();
prop.setProperty("config.listeners.default.address","19.0.60.241");
prop.setProperty("config.listeners.default.data-connection.class","org.apache.ftpserver.DefaultDataConnectionConfig");
prop.setProperty("config.listeners.default.data-connection.passive.address","19.0.60.241");
Configuration config = new PropertiesConfiguration(prop); IFtpConfig ftpConfig = new FtpConfigImpl( config );
m_ftpServer = new FtpServer(ftpConfig);
m_ftpServer.start();

First of all, sorry for taking such a long time to respond to your email!

Judging from your code you're using a very old version of FtpServer. I would strongly recommend you to update to a later version. Also, when trying to write up an example for you, I discovered that our documentation was in fact incorrect. I've updated to code to fix this (accept what is documented).

Now, with the latest code, the following example should work for you:

Properties prop = new Properties();
prop.setProperty("config.listeners.default.address","19.0.60.241");
prop.setProperty("config.listeners.default.data-connection.class","org.apache.ftpserver.DefaultDataConnectionConfig");
prop.setProperty("config.listeners.default.data-connection.passive.address","19.0.60.241");

Configuration config = new PropertiesConfiguration(prop);

ConfigurableFtpServerContext ctx = new ConfigurableFtpServerContext( config );

FtpServer server = new FtpServer(ctx);

server.start();

/niklas

Reply via email to