Your query is bad.
You mean: /resource/x/somex?q=someval
________________________________
From: Dário Abdulrehman <dario.rehman_at_gmail.com>
To: users_at_jersey.dev.java.net
Sent: Wednesday, September 7, 2011 10:13 AM
Subject: [Jersey] Mixing PathParam and QueryParam
I have a method with the following signature and but it is not working as intended because the PathParam x will also contain the QueryParam.
If I invoke it like /resource/x/somex&q=someval x will contain "somex&q=someval" instead of just "somex".
Is it possible to mix PathParam with QueryParams in this way?
Thanks.
@GET
@Path("{x}")
@Produces({MediaType.APPLICATION_JSON})
public Response doGet(@Context Request req,
@PathParam("x") String x,
@QueryParam("q") String q) throws Exception {