In our previous examples, we were working with a RESTful web service to manage a single customer object. In real life, this would obviously not be very helpful. A 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 parameters.
Query and path parameters
Query parameters
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...