Hello,
> @Path("/simple")
> public class Simple {
> @Path("/resource1")
> public class ResourceOne{
> public ResourceOne() { super("arg value"); }
> }
> @Path("/resource2")
> public class ResourceTwo{
> public ResourceTwo() { super("arg value"); }
> }
> }
I don't think this type of nesting is anywhere in the JAX-RS spec.
Sub-resources work differently. If you want sub-resources to be nested
classes you should do something like this:
@Path("/simple")
public class Simple {
public class ResourceOne{
public ResourceOne() { super("arg value"); }
}
@Path("/resource1")
public ResourceOne getResourceOne() {
return new ResourceOne();
}
public class ResourceTwo{
public ResourceTwo() { super("arg value"); }
}
@Path("/resource2")
public ResourceTwo getResourceTwo() {
return new ResourceTwo();
}
}
--
Adam Walczak
www.adamwalczak.info
+48 604 188 992