I need to get the root of the application in the Restlet resource class (it extends ServerResource). My ultimate goal is to try to return the full explicit path to another resource.
I am currently using getRequest().getResourceRef().getPath() and it almost gives me what I need. This does not return the full URL (e.g. http://example.com/app ), it returns me / resourceName. So, the two problems that I encountered are the lack of a scheme (part of http or https) and the server name, and the other is returning to where the application was installed.
So, set the person resource to http://dev.example.com/app_name/person ', I would like to find a way to return' http://dev.example.com/app_name '.
I am using Restocket 2.0 RC3 and deploying it to GAE.
source share