/**
* @param isSecure (if https - true, else false)
* @return the URL for the gadget server.
*/
public static String getGadgetserver(boolean isSecure) {
DebugDialogBox errorNotifier = DebugDialogBox.getErrorNotifier();
String serverName = null;
String serverNamePref = "://";
int nameStart = 0;
if (getGadgetXmlUrl().indexOf(serverNamePref) > 0) {
try {
nameStart = getGadgetXmlUrl().indexOf(serverNamePref)
+ serverNamePref.length();
serverName = getGadgetXmlUrl().substring(nameStart,
getGadgetXmlUrl().indexOf("/", nameStart));
} catch (Exception e) {
errorNotifier.showError(0, e.getMessage());
}
} else {
serverName = SharedConstants.defaultGadgetServer;
}