users@jsr311.java.net

Re: Dealing with Matrix parameters

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Mon, 24 Nov 2008 11:29:13 -0500

On Nov 24, 2008, at 11:07 AM, Sergey Beryozkin wrote:
> There're a reason users chose to associate matric parameteres with
> specifc path segments, it's not an arbitrary allocation, as opposed
> to query parameters. Using @PathSegments per every path segment is
> the only reliable way to find out which segment a given matrix
> parameter belongs to
>
The service is in control of the supported URI structure, if it
chooses to support the same parameter name on multiple path segments
and matrix parameter position is important then it can use either
UriInfo.getPathSegments, or @PathParam("somesegment") PathSegment arg
to extract segment specific information. If that is too onerous then
it can use different parameter names on each path segment.

Marc.

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.