users@jersey.java.net

Re: [Jersey] Binding resource to base uri

From: ???? ????????? <sunsunich_at_gmail.com>
Date: Tue, 10 Mar 2009 11:14:15 +0300

> Yes, what version of Jersey are you using? and what Web container are
> you using?
>
> Jersey can support:
>
>   @Path("/") public class Slash { ... }
>
>   @Path("/{projects}") public class Projects { ... }
>
>
> So that
>
>   http://localhost/webapp/resource/
>
> maps to the root resource Slash. And,
>
>   http://localhost/webapp/resource/1234
>
> maps to the root resource Projects.
>
>
> However as Naresh and I observe:
>
>   http://localhost/webapp/resource
>
> maps to the root resource Projects. Which is definitely a bug,
> possibly in servlet as the URI pattern "resources/*" does not match.
> Naresh could you log an issue with Jersey so we do not forget to
> investigate further?
>
> Paul.

Thanks Paul, thanks Naresh

Im trying jersey 1.0.2 and 1.0.3 on IBM Websphere AS 7.0.0.1. All
works perfectly exept the @Path("/").
http://localhost/webapp/resource/ and http://localhost/webapp/resource
in my case maps to Project resource, and
uriInfo.getPathParameters().getFirst("project") returns "resource".

Best regards,
Saiid.