[Jersey] Re: Mixing PathParam and QueryParam

From: Ransom Briggs <>
Date: Wed, 7 Sep 2011 10:40:14 -0500

You forgot the question mark, try it with /resource/x/somex?q=someval


On Wed, Sep 7, 2011 at 9:13 AM, Dário Abdulrehman
<> wrote:
> 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 {