JBoss.orgCommunity Documentation

Chapter 6. @QueryParam


RESTEasy supports @QueryParam annotations with no parameter name..

The @QueryParam annotation allows you to map a URI query string parameter or url form encoded parameter to your method invocation.

GET /books?num=5

public String getBooks(@QueryParam("num") int num) {

Currently since RESTEasy is built on top of a Servlet, it does not distinguish between URI query strings or url form encoded parameters. Like PathParam, your parameter type can be an String, primitive, or class that has a String constructor or static valueOf() method.