Gili wrote:
>
> Hi again,
>
> How do I tell Jersey to parse any URL that starts with the following
> string?
>
> http://host.com/resources/{id}
>
> That is, I'd want:
>
> http://host.com/resources/1 >
> to match with {id} = 1
>
> but I'd also want
>
> http://host.com/resources/1/bar/5 >
> to match with {id} = 1. What template string should I be using? Am I
> forced to use two separate templates?
>
> Thanks,
> Gili
>
>
> 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}");
>>
>