Re: JSR311: matrix params in _at_Path

From: Stephan Koops <>
Date: Wed, 02 Jul 2008 15:39:48 +0200

Hi Bill,

in March we explicit forbid this (see also
I think it is more clear with @MatrixParam.

I think, if someone needs different resource methods for different
matrix parameter values (e.g @Path("abc;gg=5") ), he've made a mistake
in his URI modeling. IMO the API should not support this.

Let's see what the others think

best regards

Bill Burke schrieb:
> One commenter on this list or user stated an interesting fact. You
> can't currently dispatch based on matrix parameters. I propose
> allowing matrix parameters with @Path expressions (and possibly
> removing @MatrixParam altogether)
> @Path("/;foo=bar;blah={param}/b;attr=5")
> When matrix parameters are within the @Path expression this just means
> that they must be in the URI expression. There can be other matrix
> parameters. The order of the matrix parameters doesn't matter either.
> @PathParams cannot be matrix param names, but can be values.
> So, for the above @Path expression these URIs match:
> * /;foo=bar;blah=1/b;attr=5
> * /;blah=1;foo=bar/b;attr=5
> * /;new=42;foo=bar;blah=1/b;new=11;attr=5
> These URI's don't
> * /;foo=bar/b;attr=5
> * /;foo=bar;blah=1/b
> I think this proposal simplifies things (removal of @MatrixParam) as
> well as makes our expression matching more expressive.