[jax-rs-spec users] Re: Default for missing _at_Path

From: Bill Burke <>
Date: Tue, 1 Mar 2016 13:16:11 -0500

On 3/1/2016 12:00 PM, wrote:
> Bill,
> no I did not miss that example. But -as many specs do- I assume that
> examples are non-normative but solely illustrative.

You've never dealt with the TCK :)

> Actually neither the spec nor the JavaDocs explicitly say that root
> resources MUST have @Path. In fact, Jersey deploys a root resource
> WITHOUT having @Path. That's the actual reason why I am asking: What
> DOES Jersey do in that case (it does NOT complain at least), and how
> MUST a JAX-RS implementation deal with @Path-free root resources?

Jersey is just messed up then. How is the annotation deployer supposed
to know the difference between a root resource and a sub resource
locator? You are supposed to be able to have your WAR automatically
scanned without having to explicitly declare your services in your

> In fact I don't understand why we cannot simply add a short line to
> the spec instead of discussion: "An un-annotated root resource class
> MUST be treated as if @Path("") would be existing at the class". That
> would be unambiguously make clear how Jersey, RestEasy and CXF MUST
> deal with that case.

I think this is incorrect.

Bill Burke
JBoss, a division of Red Hat