dev@jersey.java.net

Re: [Jersey] Programmatic API for configuring Jersey's ServletContainer

From: Jae Lee <jlee119_at_gmail.com>
Date: Mon, 21 Sep 2009 19:24:53 +0100

try this

WebApplication webApplication = new WebApplicationImpl();
ResourceConfig resourceConfig = new DefaultResourceConfig();

String[] filters = new String[]{"org.atmosphere.core.AtmosphereFilter"};
resourceConfig.getProperties().put(ResourceConfig.PROPERTY_RESOURCE_FILTER_FACTORIES,
filters);
webApplication.initiate(resourceConfig);


On Mon, Sep 21, 2009 at 6:01 PM, Jeanfrancois Arcand <
Jeanfrancois.Arcand_at_sun.com> wrote:

> Salut,
>
> you it be possible to add an API that allow frameworks like Atmosphere and
> Akka to programmatically configure Jersey's internal? Right now in
> Atmosphere I need to ask my user to add, in web.xml:
>
> <init-param>
>>
>> <param-name>com.sun.jersey.spi.container.ResourceFilters</param-name>
>> <param-value>org.atmosphere.core.AtmosphereFilter</param-value>
>> </init-param>
>>
>
> Since all applications requires this, I would prefer being able to do it
> inside the Atmosphere code itself.
>
> Maybe it is already doable and I've missed it?
>
> Thanks!
>
> -- Jeanfrancois
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: dev-help_at_jersey.dev.java.net
>
>