Hi, To say shortly, - path parameters are segment part of URL: /customer/546 - query parameters belong to URL query string: /books?topic=software
The main criteria how to choose query or path parameters is following: if want to return 404 error in case if parameter doesn't correspond existing resource - it candidate for path parameter. If it is OK to return empty if parameter is not found - use query one. Additionally, take into account that query parameters are normally not cached. Some additional links regarding the topic: http://stackoverflow.com/questions/4024271/rest-api-best-practices-where-to-put-parameters http://stackoverflow.com/questions/3198492/rest-standard-path-parameters-or-request-parameters Cheers, Andrei. > -----Original Message----- > From: srinivas thallapalli [mailto:[email protected]] > Sent: Freitag, 15. März 2013 08:08 > To: [email protected] > Subject: A beginner Question about the JAX-RS parameters > > Hello, > > I am bit confused about @QueryParam and @ParhParam, as when to use > which one? what are various scenarios to use each of these? > > And when we use these two type of params with POST method, don't you > think there is security problem as we are showing the param values in the ( > browser ) URL. > > Thanks > > > > -- > View this message in context: http://cxf.547215.n5.nabble.com/A-beginner- > Question-about-the-JAX-RS-parameters-tp5724606.html > Sent from the cxf-user mailing list archive at Nabble.com.
