In our previous examples, we have been working with a RESTful web service to manage a single
customer object. In real life, this would obviously not be very helpful. The common case is to develop a RESTful web service to handle a collection of objects (customers, in our example). To determine which specific object in the collection we are working with, we can pass parameters to our RESTful web services. There are two types of parameters we can use: query and path.
We can add parameters to methods that will handle HTTP requests in our web service. Parameters decorated with the
@QueryParam annotation will be retrieved from the request URL.
The following example illustrates how to use query parameters ...