dev@jsr311.java.net

matrix params in _at_Path

From: Bill Burke <bburke_at_redhat.com>
Date: Wed, 02 Jul 2008 09:21:31 -0400

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.



-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com