users@jersey.java.net

Re: Variable Number of Matrix Parameters

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Wed, 09 Jan 2008 17:06:20 -0500

Take a look at UriInfo.getPathSegments, using that you can get a list
of PathSegment which has a getMatrixParameters method.

Marc.

On Jan 9, 2008, at 4:33 PM, Hien Luu wrote:

> Hi All,
>
> My application needs to provide a REST WS API that can take a
> variable number of matrix parameters. For example
>
> http://<host>:<port>/myapp;create=a,b,c;update=e,d,f;delete=g,h,i
>
> Has anyone done something like this before? My initial thought is
> to see if there is API to get a list of matrix parameters, but I
> don't see one. It seems like I may have to do my own parsing to
> figure out all the matrix parameters. I prefer not to do this if
> jersey already does it.
>
> Any suggestions/ideas will be greatly appreciated.
>
> Hien

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