application.getServerURL() returns no ip address and portnr

I made a little method that clears Java cache and removes .servoy folder on client’s computer. Sometimes that could be usefull to do. Especially by often updating plugins and beans :wink: .
After performing this action, I like also to (automaticly) download the same client again. Problem here is that application.getServerURL() returns nothing in the smart client, so the url to download the client again is unvalid.

This is the way I try to retrieve the deeplink to download the client again:

var vServerURL = application.getServerURL()
var vSolution = application.getSolutionName()
vServerURL += '/servoy-client/servoy_client_' + vSolution + '.jnlp'
application.showURL(vServerURL)

In smart client vServerURL returns ‘http:///servoy-client/servoy_client_.jnlp’. (In developer the deeplink works, btw)
Anybody know why vServerURL does not contain the ip address and portnr?

how do you test it?
in a real smart client (so not developer) that should give you the webstart url.
You can override that url by setting a system property: servoy.server_url
so if you have set that to “” then it will be an empty string.

in the debugger (3.5 an 4.0) we should always return 127.0.0.1 something…

See the last posts of this topic http://www.servoy.com/forum/viewtopic.php?f=22&t=6900&start=45&st=0&sk=t&sd=a

Looks like problem I noticed is familiar.

everything in that post is the way it works.

serverurl on the webclient will always return localhost.

because there is not really a server for that client, because it is the server.