You can try to create a hidden element on the HTML file with the server name. Example:
<input type="hidden" name="server-name" id="server-name" value="SERVER NAME HERE">
And you can get the value in GWT with:
InputElement input = (InputElement) Document.get().getElementById("server-name");
String serverName = input.getValue();
Another way is creating in the HTML file, a Javascript global variable via script tag or script file and load this via GWT using JSNI or JSInterop (the example is with JSNI):
<script>
window.SERVER_NAME = [SERVER_NAME_HERE];
</script>
In GWT:
public class ServerNameUtil {
public static native String getServerName() /*-{
return $wnd.SERVER_NAME;
}-*/;
}
You can improve these ideas for your solution. IT is some ideas to help you to think of the best solution for your scenario. :)