users@jersey.java.net

[Jersey] Re: Regular Expression matching any

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Mon, 08 Aug 2011 09:57:50 +0200

Hello Ayesha,

it seems you are using query params in the place where you expect {sub}. Try updating your method path to @Path("{id}).
Then your URL with query parameters would look like:

http://localhost:8080/subscription/121231?param1=value1&param2=value2

HTH,
Marek

On 08/05/2011 08:19 PM, Ayesha wrote:
> Hello Paul,
>
> I have a problem with the leading question mark that is added is http
> request. my url pattern is going to be like this:
> http://localhost:8080/subscription/121231/?param1=value1&param2=value2
>
> my resource path is:
> @Path("/subscription/")
>
> my path is set as:
>
> @GET
> @Path("{id}/{sub}")
> @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
> @Consumes({MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN})
>
> Can you pls tell me how can I handle the leading question mark in the url?
> as of now I have to send the request without question mark:
> http://localhost:8080/subscription/121231/?param1=value1&param2=value2
>
> how can I support the one that I want? that is the following:
> http://localhost:8080/subscription/121231/?param1=value1&param2=value2
>
> Thanks you.
> Ayesha
>
> --
> View this message in context: http://jersey.576304.n2.nabble.com/Regular-Expression-matching-any-tp5186256p6657525.html
> Sent from the Jersey mailing list archive at Nabble.com.