I have a URL e.g.  http://myhost.com/a/b/c

Now lets say b is matched by a resource method

class RootResource{
@GET
@Path("/b")
TypeX getB() {...}
}

and in class TypeX:

class TypeX{
@GET
@Path("/c")
String getC() {...}
}

While the URL http://myhost.com/a/b works as expected, http://myhost.com/a/b/c not works (cause is not available). I think the selection algorithm is already satisfied by having found the getB resource method, and does not know what to do with the rest of the URL. By inserting following method into RootResource, I have a workaround, which is not very nice:

@Path("/b/")
TypeX getBAndGotoSubresource() { return getB(); }


So my question is: is here a bug or is that behavior specified by REST spec?

Reply via email to