users@jersey.java.net

Re: [Jersey] GrizzlyServerFactory ignores the path info from URI

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 30 Jan 2009 17:14:41 +0100

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.

Paul.


> Thanks
>
> -- Jeanfrancois
>
>
>> Paul.
>> On Jan 27, 2009, at 11:15 AM, Srinivas Naresh Bhimisetty wrote:
>>> Hi,
>>>
>>> I was playing around with the GrizzlyServerFactory API and found
>>> the following issue:
>>>
>>> The API ignores any path info from the URI used to create a
>>> SelectorThread instance.
>>> Say for example, I try to create the SelectorThread as:
>>> GrizzlyServerFactory.create("http://localhost:9998/helloworld-
>>> webapp", resourceConfig);
>>> All works fine and the thread starts running, but when I try to
>>> GET [1] it returns 404 status code. However, for [2] it gives the
>>> expected output.
>>>
>>> Is it as per design that the factory ignores the path elements
>>> from the URL?
>>>
>>> [1] http://localhost:9998/helloworld-webapp/helloworld
>>> [2] http://localhost:9998/helloworld
>>>
>>> Thanks,
>>> Naresh
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>