以下代码
RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode("http://localhost:8080/xxxx/yyyy"));
try {
Request request = builder.sendRequest(null, new RequestCallback() {
public void onError(Request request, Throwable exception) {
}
public void onResponseReceived(Request request, Response response) {
}
});
} catch (RequestException e) {
possiblePages.clear(); possiblePages.addItem("could not connect to server");
}
写入GWT / Java编译为javascript,出现以下错误(显示在firebug中)
syntax error
[Break on this error] begin
“begin”是从url返回的文本文件的第一行,所以我看到它从哪里获取,但为什么它被视为JavaScript?
答案 0 :(得分:1)
嘿马特,我有两个你可以尝试的想法: