users@jersey.java.net

Sub-resource locators for _at_Path("/{x}") and _at_Path("/")?

From: Chris Hubick <chris_at_hubick.com>
Date: Sat, 17 Oct 2009 13:21:14 -0600

Hi.

I wish to have my resource (which is itself a sub-resource) provide two
separate sub-resource locators. I would like to use one sub-resource
locator if an 'x' param is supplied in the path, else I would like to
fallback to a "default" sub-resource locator.

I annotated one locator with @Path("/{x}") and the other "default" one
with @Path("/"), but the latter doesn't seem to work, yielding a 405
status. If I modify the latter path to include a literal like
@Path("/default"), it then works under that path.

Is this behavior correct due to some restriction, is this a bug, or am I
likely doing something wrong?

Thanks!

-- 
Chris Hubick
mailto:chris_at_hubick.com
http://www.hubick.com/chris/