On Sun, Nov 20, 2011 at 10:14 PM, Florent Georges <li...@fgeorges.org> wrote: > Niklas Gustavsson wrote: >> On Sun, Nov 20, 2011 at 8:54 PM, Florent Georges wrote: > > Niklas, > > Thank you very much for your help, much appreciated! > >>> But I don't understand how I am supposed to do. If I am >>> right, the beforeCommand() method is called first on the >>> FTPlet, then FTP Server itself handles the command, then >>> afterCommand() is called. But I did not find any way to >>> handle the request myself and return myself the FtpReply I >>> want to. > >> This page should describe the basics: >> http://mina.apache.org/ftpserver/ftplet.html > >> You'll need to implement the handling in your Ftplet (feel free >> to steal from the command implementations) and return SKIP to >> the container in order to ignore the default command handler. > > That's what I thought too (I've read this page before). But if > I return SKIP, how can I control the response sent back to the > client? (that is, how can I provide the corresponding FtpReply?)
Here's a very basic example: https://svn.apache.org/repos/asf/mina/ftpserver/trunk/ftplet-api/src/test/java/org/apache/ftpserver/ftplet/ExampleFtplet.java /niklas