mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sisk, Brad" <BS...@ancorinfo.com>
Subject RE: Simple One: Deploying an Ftplet
Date Thu, 11 Sep 2008 20:01:16 GMT
Thank you very much, Niklas, I appreciate it. 

I can post this solution unless you plan to do so.

-----Original Message-----
From: Niklas Gustavsson [mailto:niklas@protocol7.com] 
Sent: Thursday, September 11, 2008 3:59 PM
To: dev@mina.apache.org
Subject: Re: Simple One: Deploying an Ftplet

Hey

Let's see if I can give you some pointers.

On Thu, Sep 11, 2008 at 6:55 PM, Sisk, Brad <BSisk@ancorinfo.com> wrote:
> I am brand new to Apache's Ftplet API, never needed to use it before.
I
> understand how to use it to write Ftplets-but have been unable to find
> any documentation on the web anywhere for how you actually add an
Ftplet
> to an application server and get it to work.  The FTPServer
application,
> itself, must also be deployed for Ftplets to work...so how do I add
them
> both to a project, and configure the deployment descriptors
accordingly.
>
> I am using SJAS (Glassfish) as the AppServer, with Java6.  Evidently,
> Ftplets only build within a Spring framework, so the Spring jarfiles
are
> already included in the hosting webapp.

So, if I understand you want to run FtpServer embedded within your
application, in turn running in SJAS? If so, you don't need Spring at
all, that's only used for our XML config format. In the case where
you're embedding FtpServer, you need the minimal set of JARs
(ftplet-api, ftpserver core, MINA, SLF4J) and your Ftplet. Then you do
something like:

        FtpServer server = new FtpServer();

        FtpletContainer container =
server.getServerContext().getFtpletContainer();
        container.addFtplet("myFtplet", new MyFtplet());

        server.start();

That should be all you need.

> Because FtpServer is relatively new, from Apache, and FTPServers are
not
> commonly needed for web or enterprise applications, there is hardly
any
> documentation, or even a step-by-step list of where to put all of
these
> classes and how to configure them to work.

Yeap, our documentation is certainly limited, an example like this
should probably be added.

/niklas

Mime
View raw message