On Jan 30, 2009, at 6:42 PM, Jeanfrancois Arcand wrote:
> Salut,
>
> Paul Sandoz wrote:
>> On Jan 30, 2009, at 4:32 PM, Jeanfrancois Arcand wrote:
>>> Salut,
>>>
>>> Paul Sandoz wrote:
>>>> Hi Naresh,
>>>> Yes, that is an issue. Do you want to have a go fixing it? IIRC i
>>>> was not sure how to set this context for the embedded Grizzly,
>>>> ideally it is something we inform Grizzly of rather than support
>>>> it in the container, but we could the latter if necessary.
>>>
>>> OK keep me posted on that issue as I would like to fix it asap in
>>> Grizzly. Can you point me to a uses case I can try?
>>>
>> Basically we need a way to set some base URI path, equivalent say
>> to the context path of a servlet.
>> Jersey has the following method:
>> public static SelectorThread create(URI u, Adapter adapter) { ... }
>> we want to set the path of 'u' to be the base path of the selector
>> thread and for the Adapter to be able to get that vase path.
>> I think i can implement it myself in the Jersey GrizzlyAdapter but
>> i guess this is something that might be rather common.
>
> Would GrizzlyAdapter.setRootFolder does the trick? The API is
> already there right now and used for servicing static resources.
> Take a look and let me know if this is not enough.
Does the root folder have to correspond to an existing folder in the
file system?
Say i have a base URI:
http://localhost/base
and i set the root folder to "base".
If i do a GET
http://localhost will the adapter still be serviced?
Actually Naresh found the following method:
StaticResourcesAdapter.setResourcesContextPath
and from reading the JavaDoc it might do just what we require? Naresh
is investigating.
Paul.
P.S. for some reason NetBeans does not highlight that the Grizzly jar
files have JavaDoc associated with them.