On Mar 18, 2008, at 9:44 AM, Stephan Koops wrote:
>
>>> is it right, that only the matrix parameters of the currently
>>> matched path segment are relevant for @MatrixParam, and ancestor
>>> path segment matrix parameters are ignored?
>>> This makes the most sense for me.
>> No, but if you have the same matrix param on the current path
>> segment as on a previous one, the current one overrides the previous.
> If I request a collection, than I get all?
>
> example:
> http://host.org/path1;mp1=a;mp2=b/path2;mp1=c;mp1=d
> and the resource method for path2 requests @MatrixParam("mp1")
> than the method get the 4 values [1,2,3,4]
>
> The consequence is: If you use @MatrixParam, you can not be sure,
> that the requested matrix parameter was available in the current
> path element.
>
> I want to show that; I also don't now a good solution for this.
>
You can use UriInfo.getPathSegments if you want to examine matrix
parameters on a per-path segment basis.
Marc.
---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.