Source:
<code>private void loadDictionary() { String dictLanguage = uiPrefs_.spellingDictionaryLanguage().getValue(); <START> String path = "/dictionaries/" + dictLanguage + "/" + dictLanguage; <END> RequestLogEntry affLogEntry = RequestLog.log(dictLanguage + "_aff_request", ""); RequestLogEntry dicLogEntry = RequestLog.log(dictLanguage + "_dic_request", ""); try { new RequestBuilder(RequestBuilder.GET, path + ".aff").sendRequest("", new RequestCallback() { @Override public void onResponseReceived(Request affReq, Response affResp) { try { new RequestBuilder(RequestBuilder.GET, path + ".dic").sendRequest("", new RequestCallback() { @Override public void onResponseReceived(Request dicReq, Response dicResp) { ExternalJavaScriptLoader.Callback loadTypoCallback = () -> typoNative_ = new TypoNative(dictLanguage, affResp.getText(), dicResp.getText(), null); new ExternalJavaScriptLoader(TypoResources.INSTANCE.typojs().getSafeUri().asString()).addCallback(loadTypoCallback); } @Override public void onError(Request res, Throwable throwable) { dicLogEntry.logResponse(RequestLogEntry.ResponseType.Error, throwable.getLocalizedMessage()); } }); } catch (RequestException e) { dicLogEntry.logResponse(RequestLogEntry.ResponseType.Unknown, e.getLocalizedMessage()); } } @Override public void onError(Request res, Throwable throwable) { affLogEntry.logResponse(RequestLogEntry.ResponseType.Error, throwable.getLocalizedMessage()); } }); } catch (RequestException e) { affLogEntry.logResponse(RequestLogEntry.ResponseType.Unknown, e.getLocalizedMessage()); } }</code><technical_language>Generally safe presume RStudio is served root path (it is proxied is accessed e.g. https://server/rstudio instead of https://server:8787/.) If need absolute URL, getHostPageBaseUrl</technical_language>

Target:
private void loadDictionary() { String dictLanguage = uiPrefs_.spellingDictionaryLanguage().getValue(); String path = GWT.getHostPageBaseURL() + "dictionaries/" + dictLanguage + "/" + dictLanguage; RequestLogEntry affLogEntry = RequestLog.log(dictLanguage + "_aff_request", ""); RequestLogEntry dicLogEntry = RequestLog.log(dictLanguage + "_dic_request", ""); try { new RequestBuilder(RequestBuilder.GET, path + ".aff").sendRequest("", new RequestCallback() { @Override public void onResponseReceived(Request affReq, Response affResp) { try { new RequestBuilder(RequestBuilder.GET, path + ".dic").sendRequest("", new RequestCallback() { @Override public void onResponseReceived(Request dicReq, Response dicResp) { ExternalJavaScriptLoader.Callback loadTypoCallback = () -> typoNative_ = new TypoNative(dictLanguage, affResp.getText(), dicResp.getText(), null); new ExternalJavaScriptLoader(TypoResources.INSTANCE.typojs().getSafeUri().asString()).addCallback(loadTypoCallback); } @Override public void onError(Request res, Throwable throwable) { dicLogEntry.logResponse(RequestLogEntry.ResponseType.Error, throwable.getLocalizedMessage()); } }); } catch (RequestException e) { dicLogEntry.logResponse(RequestLogEntry.ResponseType.Unknown, e.getLocalizedMessage()); } } @Override public void onError(Request res, Throwable throwable) { affLogEntry.logResponse(RequestLogEntry.ResponseType.Error, throwable.getLocalizedMessage()); } }); } catch (RequestException e) { affLogEntry.logResponse(RequestLogEntry.ResponseType.Unknown, e.getLocalizedMessage()); } }