The following seems to have taken care of it for me ...
(Reference.decode((String)request.getAttributes().get("Param2")))
質問
I have a URI like this:
http://localhost:8111/myService/{Param1}/{Param2}/Param3
Param1, Param2, Param3 may or may not contains special characters such as #, &, @, /
I am having the clients encode these special characters such as using %2F for /
On the restlet side I am then using string replace to decode these characters.
param2.replaceAll("%2F", "/")
Is there a better way to do this to auto interpret these encoded characters?
解決
The following seems to have taken care of it for me ...
(Reference.decode((String)request.getAttributes().get("Param2")))