【发布时间】:2014-06-28 18:09:57
【问题描述】:
当我从 android httpclient utils 访问 localhost servlet 时,我收到 connection refused 错误。 servlet 运行良好,但出现错误。
这是代码:
String dmurl="http://127.0.0.1:9090/DataManagerProject/DMServlet";
HttpClient httpClient = new DefaultHttpClient();
HttpGet hrtreq = new HttpGet(dmurl);
HttpResponse resp = httpClient.execute(hrtreq);
String output = EntityUtils.toString(resp.getEntity());
我收到以下错误org.apache.http.conn.httphostconnectexception connection to refused
【问题讨论】:
标签: java android servlets httpclient