In my previous sample, the second class should be named SubResource, of course:
On 03/11/2011 11:51 AM, Marek Potociar wrote:
> @Path("/")
> Resource {
> @Path("{segment}")
> public SubResource getSubresource() {
> return new SubResource();
> }
>
> @GET
> public String get() {
> return "No segments. Root is a leaf";
> }
> }
>
> SubResource {
> @Path("{segment}")
> public SubResource getSubresource() {
> return new SubResource();
> }
>
> @GET
> public String get(@PathParam("segement") last) {
> return "Leaf subresource reached. Last segment: " + last;
> }
> }
>