JAX-RS (REST)No Comments

Matrix parameters are a set of “name=value” in URI path, for example,

In above URI, the matrix parameter is “author=javasail“, separate by a semi colon “;“.

  • @MatrixParam example

See a full example of using @MatrixParam in JAX-RS.

See following URI patterns and result.

1. URI Pattern : “/books/2011/

2. URI Pattern : “/books/2011;author=javasail

3. URI Pattern : “/books/2011;author=javasail;country=vietnam

4. URI Pattern : “/books/2011;country=vietnam;author=javasail

Be the first to post a comment.

Add a comment