Unfortunately, application.getServerURL() returns http://localhost:-1 when run from a headless client (rest_ws) in WAR deployment. So, no portnumber and no context.
I'm able to find out the context by using plugins.UserManager.Server().servoyDirectory, but then plugins.UserManager.Server().webServerPort gives me a -1.
I found some useful stuff in Packages.javax.servlet.http.HttpServletRequest (getLocalPort(), getRemotePort(), getContextPath()), but I don't know how to access it from within Servoy (or if it is even possible)
Does anyone know a way to get the full path to the 'base url' of the server?