[Jersey] Re: Mixing PathParam and QueryParam

From: Ronak Patel <>
Date: Wed, 7 Sep 2011 13:12:38 -0700 (PDT)

Your query is bad.

You mean:  /resource/x/somex?q=someval

From: Dário Abdulrehman <>
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?


    public Response doGet(@Context Request req,
            @PathParam("x") String x,
            @QueryParam("q") String q) throws Exception {