users@jersey.java.net

Re: [Jersey] Simple _at_Path question

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 01 Apr 2010 12:20:57 +0200

Hi Gregg,

The following worked for me:

    @GET
     @Path("{x: queries(\\.json)?}")
     public String get() {
         return "FOO";
     }

for the following paths:

   /.../queries
   /.../queries/
   /.../queries.json
   /.../queries.json/

what version of Jersey are you using?

Paul.

On Apr 1, 2010, at 12:47 AM, Gregg Carrier wrote:

> Dropping the leading "/" makes it match /queries.json but not /
> queries or /queries/
>
> Thanks for the idea.
>
> On Wed, Mar 31, 2010 at 12:21 PM, Marc Hadley
> <marc.hadley_at_oracle.com> wrote:
> On Mar 30, 2010, at 5:58 PM, Gregg Carrier wrote:
>
> > I'm trying to match
> > /queries
> > AND
> > /queries.json
> >
> > This is my @Path:
> > @Path("{dummy:/queries(\\.json)?}")
> >
> > Seems like a simple enough regex - can't get Jersey to do the
> right thing.
> >
> Does it work if you drop the leading '/' in the regex ?
>
> Marc.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>