Does Restlet support parsing URLs into calling methods with parameters?

Posted by John C on Stack Overflow See other posts from Stack Overflow or by John C
Published on 2010-04-19T16:07:15Z Indexed on 2010/04/19 16:13 UTC
Read the original article Hit count: 269

Filed under:
|

Take the following example.

I have a resource

public class HelloWorldResource extends ServerResource {

    @Get
    public String represent(String arg) {
        return "hello, world (from the cloud!)" + arg;
    }


}

That is mapped by

router.attach("/hi/{message}", HelloWorldResource.class);

Is it possible to configure the routing such that accessing /hi/somestuffhere will make restlet fill in the arg parameter in the represent method?

© Stack Overflow or respective owner

Related posts about java

Related posts about restlet