users@jersey.java.net

[Jersey] Mixing PathParam and QueryParam

From: Dário Abdulrehman <dario.rehman_at_gmail.com>
Date: Wed, 7 Sep 2011 15:13:23 +0100

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 {