1

I am newbie in RESTful jersey. I would like to ask what is the different among '@PathParam' Vs '@QueryParam' vs '@MatrixParam' in jersey?.

Deepak Gupta
  • 1,075
  • 15
  • 21
  • For an explanation about @MatrixParam, I liked this analogy: https://stackoverflow.com/a/46565703/3154883 – Brother Aug 31 '18 at 15:38

1 Answers1

0

Can't help you with the @MatrixParam but can give you an answer for the other two:

  • @PathParam: you use placeholder in the path. For example: @Path("/demo/{id}"). In this case the {id} part is your placeholde which you get with @PathParam("id")
  • @QueryParam: you use the normal uri query Syntax. For example: google.com?q=searchquery which translates to: @QueryParam("q") in your application
Markus Mauksch
  • 397
  • 1
  • 9