users@jersey.java.net

[Jersey] Path matching order

From: Cheng Zhang <zhangyongjiang_at_yahoo.com>
Date: Sun, 2 Jan 2011 09:56:43 -0800 (PST)

Hi,

If I have a resource class defined as below,

@Path("/category")
public class Resource {
    @GET
    @Path("/{page: .+}")
    public Response catchAny(@PathParam("page") String page) throws IOException
{
        ......
    }

    @GET
    @Path("{categoryId}")
    public Response getCategory(@PathParam("categoryId")) {
        ......
    }
}

On the client side, if the path is "/category/12", which server side method will
be called?

Thanks,
Kevin