[jax-rs-spec users] [jsr339-experts] Injecting a sub-resource method path parameter into a resource field - legal or not?

From: Marek Potociar <>
Date: Thu, 23 Feb 2012 12:01:45 +0100

Hello experts,

we've received a bug report in Jersey about the following use case:

public class FooResource {
    @PathParam("id") String id;

    public String get() {
        return id;

My question is, given the "id" path template is defined on a sub-resource method, should the value still be injectable
into the resource field or not?

IOW, with the example above, what should be a result of GET "/foo/bar/baz" request? Should it be "baz" or null ?