I need to parse the parameter from the following URL: http://mysite.com/customer/token/name/customerName
So there are two parame开发者_JAVA百科ters in above case, customer => token and name => customerName. How do I retrieve parameters (name from the key) for the above url?
Thanks.
You could do something like:
router.attach("/name/{name}", HelloWorldResource.class);
Then access it like:
String m = (String)this.getRequestAttributes().get("name");
This is called template.
精彩评论