users@jersey.java.net

Re: [Jersey] Regex for _at_GET - 0 or 1 parameters?

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 09 Jun 2010 11:35:55 +0200

On Jun 9, 2010, at 10:53 AM, Michael Norman wrote:

>
> It is possible to annotate a getCar method so that both
>
> /resource-root/Car (returns all Cars)
> and
> /resource-root/Cars/1 (returns Car whose id is 1)
>
> go to the same method?
>

No, You need to annotate two separate methods, each of which can of
course call a shared method.

Paul.