users@jersey.java.net

Re: [Jersey] How to access init-param values from a Jersey web application

From: Edwin Shin <eddie_at_fedora-commons.org>
Date: Thu, 20 May 2010 14:23:21 +0200

Martin,

See my last few emails about testing with init-params and Pavel & Paul's responses:

https://jersey.dev.java.net/servlets/BrowseList?list=users&by=thread&from=2947919

Eddie

On 20 May 2010, at 1:57 PM, Martin Giese wrote:

> Hi,
>
> I have a nice litte web app with a main Application class (in fact, it
> extends PackagesResourceConfig) and a few root resources.
>
> Now I have put some configuration information into web.xml in
> <init-param> elements. It seems that I need a ServletContext or
> ServletConfig to get at the initialization parameters. I know I can use
> @Context to inject these into the root resource classes, but that means
> I get the values when a request is processed. I would like to get them
> at initialization, i.e. in the constructor of the Application class. Is
> that possible?
>
> Yours,
> Martin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>