[Jersey] Re: Decoding URI into path parameters

From: Gili <>
Date: Tue, 5 Apr 2011 16:31:51 -0700 (PDT)

Hi again,

How do I tell Jersey to parse any URL that starts with the following string?{id}

That is, I'd want:

to match with {id} = 1

but I'd also want

to match with {id} = 1. What template string should I be using? Am I forced
to use two separate templates?


Martin Matula-3 wrote:
> On 17.3.2011 14:27, Gili wrote:
>> Martin Matula-3 wrote:
>>> You can use path parameter instead of a particular hostname, like this:
>>> UriTemplate ut = new
>>> UriTemplate("http://{host}/context/jersey/books/{id}/page/{pageNum}");

View this message in context:
Sent from the Jersey mailing list archive at