GWT 응용 프로그램에서 서블릿으로 요청을 가져 오려고합니다. 코드를 컴파일 할 때 이러한 오류가 발생합니다.소스 코드를 사용할 수 없습니다. GWT 컴파일 오류
[ERROR] Line 16: No source code is available for type org.apache.http.client.ClientProtocolException; did you forget to inherit a required module?
[ERROR] Line 16: No source code is available for type org.apache.http.ParseException; did you forget to inherit a required module?
[ERROR] Line 16: No source code is available for type org.json.simple.parser.ParseException; did you forget to inherit a required module?
이 오류를 제거하려면 어떻게해야합니까? GWT에서 이러한 클래스를 지원하지 않습니까? 나는 이것이 보통의 자바 프로젝트/콘솔 응용 프로그램에 사용하는 경우
다음
내가이 코드는 잘 작동public String getJSON() throws ClientProtocolException, IOException, ParseException{
HttpClient httpclient = new DefaultHttpClient();
JSONParser parser = new JSONParser();
String url = "some - url - can't disclose";
HttpResponse response = httpclient.execute(new HttpGet(url));
JSONObject json_data = (JSONObject)parser.parse(EntityUtils.toString(response.getEntity()));
JSONArray results = (JSONArray)json_data.get("result");
}
사용하고있는 코드입니다.