【发布时间】:2011-11-16 02:11:27
【问题描述】:
使用 Restlet,我如何检索 URL 中传递的属性?
示例:http://localhost:8888/contacts/123
在这里,我要检索 123 的值。
我正在使用下一组代码:
router.attach("contacts/{contact_id}", ContactResource.class);
public class ContactResource extends ServerResource
{
@Get
public ContactDetail retrieve()
{
//how to retrieve the contact_id value?
return null;
}
}
【问题讨论】:
标签: java google-app-engine url-rewriting restlet