users@jsr311.java.net

Re: Path annotations for class resources

From: Bill Burke <bburke_at_redhat.com>
Date: Wed, 27 Feb 2008 12:59:57 -0500

Sergey Beryozkin wrote:
> Thanks...
>
> here's another question.
>
> If a @Path annotation for a root resource contains template variables
> then how are they applied to diferrent resource methods ?
> For ex :
>
> @Path("/foo/{id1}")
> class Foo {
>
> @GET
> public Bar getBar(@PathParam String id1 <mailto:id1_at_PathParam>) {
> }
>
> @GET
> Path("bar")
> public Bar getSubresourceMethodBar(@PathParam String id1
> <mailto:id1_at_PathParam>) {
> }
> }
>

I believe id1 is not available in Bar. In other words, path params are
scoped to the resource they are defined in.

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com