[ 
https://issues.apache.org/jira/browse/WINK-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12735970#action_12735970
 ] 

Nadav Fischer commented on WINK-119:
------------------------------------

The fix also allows for sub-resource locators to specify an empty path, 
something like:


{code}
@Path("hello")
public static class Resource {
    @GET
    public String getHello() {
        return "Hello";
    }
        
    @Path("")
    public Located locator() {
        return new Located();
    }
}

public static class Located {
    @GET
    @Path("world")
    public String getHelloWorld() {
        return "Hello world";
    }
}
{code}

So that a request to /hello will yield "Hello" and a request to /hello/world 
will yield "Hello world"

> Root Resources at "/" with Subresource Locators/Methods does not work
> ---------------------------------------------------------------------
>
>                 Key: WINK-119
>                 URL: https://issues.apache.org/jira/browse/WINK-119
>             Project: Wink
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 0.1
>            Reporter: Bryant Luk
>            Assignee: Nadav Fischer
>             Fix For: 0.1
>
>         Attachments: WINK-119.patch
>
>
> A root resource with @Path("/") and a subresource method/locator will not 
> match.
> {code}
> @Path("/")
> public class Root {
>    @GET
>    @Path("hello")
>    public String getHelloWorld() {
>       return "Hello world";
>    }
> }
> {code}
> And issuing a GET to /hello would result in a 404.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to