use pathparam JAX-RS restful webservices code example
Example: use pathparam JAX-RS restful webservices
@Path("/users/{username}")
public class UserResource {
@GET
@Produces("text/xml")
public String getUser(@PathParam("username") String userName) {
...
}
}