users@jersey.java.net

Re: [Jersey] Uri matching

From: Bryon Jacob <bryon_at_jacobtx.net>
Date: Wed, 25 Feb 2009 09:28:03 -0600

yes - you provide a regular expression to specify what matches each
path param, so in your case you can say:

@Path("/get/{query : .*}")

and query will match everything after the get/

(by default, the regex is something like [^/]*, so params match
"everything up to the next slash".)


On Feb 25, 2009, at 9:13 AM, Vyacheslav V. Zholudev wrote:

> Hi!
>
> I'm a newbie to Jersey, so forgive me for a possibly trivial
> question. Is there a way to match the rest of a @Path? For instance
> if I provide
> @Path(/get/{query})
> then when the url is like /get/foo/bar/doc
> then 'query' variable will be matched to '/foo/bar/doc'?
>
> Thanks in advance,
> Vyacheslav
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>