users@jersey.java.net

Re: ServletContainer jar scanning exception

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 07 Jan 2008 13:51:19 +0100

Richard Wallace wrote:
>> I am glad we have a pluggable solution via ResourceConfig so that
>> developers can choose one of a standard set of strategies or a roll
>> their own.
>>
>
> This is the solution that I wound up implementing on the train to work
> this morning. I created a PackageResourceConfig like you mentioned
> before and (since I'm already using Struts2) used the XWork ResolverUtil
> I mentioned previously to do the grunt work. The only problem that I
> ran into was that, at first, I thought the parameter map passed into the
> constructor would contain a complete list of servlet init parameters.
> So I added an init-param for "resourcePackages" with my resource package
> like "com.myco.myapp.rest" and had hoped to be able to get it from my
> PackageResourceConfig. But that doesn't work. On closer inspection,
> the parameter map passed to the constructor is a newly created map with
> only the PROPERTY_RESOURCE_PATH attribute copied over. For now I've
> hard coded my resource package, but I'd rather not have to. Is there
> any reason the servlet parameter map isn't just passed along to the
> constructor directly?
>

No, I can implement that.

For 0.6 what i would like to do is support injection on the instance,
that way the ServletContext can be injected.

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109