users@grizzly.java.net

Re: add second ServletAdapter to GrizzlyWebServer after webserver.start()

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Wed, 01 Apr 2009 19:56:37 -0400

Salut,

Edward Chou wrote:
> Hi,
>
> I am wondering if the following is possible:
>
> GrizzlyWebServer webServer = new GrizzlyWebServer(9999);
>
> ServletAdapter adapter1 = createAdapter("/atom1");
>
> webServer.addGrizzlyAdapter(adapter1, new String[] { "/atom1" });
> webServer.start();
>
> < .. do something else ... >
>
> ServletAdapter adapter2 = createAdapter("/atom2");
> webServer.addGrizzlyAdapter(adapter2, new String[] { "/atom2" });

Yes, it should work:\. Take a look at:

https://grizzly.dev.java.net/nonav/xref-test/com/sun/grizzly/http/GrizzlyWebServerTest.html


>
>
> Basically, I want to deploy a second ServletAdapter after the
> GrizzlyWebServer has already been started. Currently, the second
> servlet is not activated, but first servlet is. Any help is appreciated.

Hum...let me try it then. Which version are you using?

Thanks

-- Jeanfrancois


>
> Edward
>
>
>