Hi Nelson,

I think Guice could be used as an effective way to register servlets.  Guice
was discussed by a few members back in September, but it was decided then
that servlet registration process could be easier to follow with a refactor
that I don't believe was ever integrated:
http://codereview.waveprotocol.org/110002/show (see ServletCollection).

As a frame of reference, here is an example of how servlet registration is
done through Guice in Splash. Note that this was contributed by Dhanji who
is one of the commiters (and I believe original authors) of the Guice
framework. That's not to say that it has to be done this way, but it is
probably a pretty good reference.

http://code.google.com/p/google-wave-splash/source/browse/trunk/src/com/google/wave/splash/web/WebServletModule.java(see
configureServlets)

R,

Anthony

On Mon, Mar 28, 2011 at 7:39 AM, Yuri Z <[email protected]> wrote:

> I think that using GuiceServletContextListener instead of manual servlet
> registration would be a good move.
>
> 2011/3/28 Nelson Silva <[email protected]>
>
> > Hi all,
> >
> > Just wondering if it would be possible to use GWT's hosted Jetty to start
> > WAIB's servlets and websocket server.
> > I've been using remote debug but being able to launch this from the IDE
> > would be great.
> >
> > Could we use a GuiceServletContextListener to register the servlets
> instead
> > of relying on ServerMain ?
> >
> > This would still allow us to have a programatic configuration (only a
> > guicefilter in the web.xml) but could decouple from the internal Jetty
> > server.
> >
> >
>

Reply via email to