Validating path to nested resource
问题 I'm using Jersey to implement a RESTful Service with some nested resources. This is a basic example of what I currently have: @Path("/sites") public class SiteResource { @GET @Path("/{siteId}") public Site get(@PathParam("siteId") long siteId) { Site site = // find Site with siteId if (site == null) { throw new WebApplicationException(Response.Status.NOT_FOUND); } return site; } } @Path("/sites/{siteId}/articles") public class ArticleResource { @GET @Path("/articleId") public Article get(