users@jersey.java.net

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

From: Martin Giese <martingi_at_ifi.uio.no>
Date: Thu, 20 May 2010 15:22:02 +0200

On 05/20/2010 03:12 PM, Paul Sandoz wrote:
> On May 20, 2010, at 2:29 PM, Martin Giese wrote:
>> On 05/20/2010 02:23 PM, Edwin Shin wrote:
>>> 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
>>>
>>>
>>>
>> I saw those (after my original post), thank you! But it seems that
>> those inject the config into the constructor for resource objects, and
>> not for the application object. I tried doing it for the Application
>> object,
>>
>> class MyApp extends Application
>> public MyApp(@Context ServletConfig sc) {
>> ...
>> }
>> }
>>
>> but the application object is constructed with the no-argument
>> constructor, so that didn't help.
>>
>
> What version of Jersey are you using?
I have

jersey-core-1.0.3.jar
jersey-server-1.0.3.jar

Should I be using jersey-1.2 ?

Martin