Hello Tobias,
there are two ways to design your server resources. As Restlet 1.1, you can
rely on the methods such as get(Variant), post(Representation, Variant), etc in
conjunction with the list of supported variants that you manage manually.
Otherwise, you can use annotated methods (with or without parameters, with or
without converters).
Please note that if an annotated method accepts a parameter, this parameter
corresponds to the entity of the incoming request. That means that a method
annotated with "@Get" can't have a parameter.
in your case, you can design your resource as follow :
public class ResourceTUM extends AbstractResourceTemplate {
@Get("txt")
public String toText() {
return "my text representation"
}
@Get("html")
public Representation toHtml() {
[...]
}
I hope it clarifies what happens.
Feel free to ask for more details.
Best regards,
Thierry Boileau
[1] http://wiki.restlet.org/developers/172-restlet/226-restlet.html
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2671286