@QueryParam Annotation



The @QueryParam annotation extracts the value of a URI query parameter. 
Query parameters are key/value pairs separated by an & symbol 
such as http://www.myworld.com/item?zip=388001&city=anand

@Path("/item")
@Produces(MediaType.APPLICATION_JSON)
public class ItemRestService {
@GET
public Items getItemsByZipCode(@QueryParam("zip") Long zip,
        @QueryParam("city") String city) {
      // URI : /item?zip=388001&city=anand
}
}


Ref:  Beginning JavaEE7