ftpclient见附件
HttpClient client = new HttpClient();
HttpMethod method = new GetMetho("http://192.168.2.11/LCCCDealServlet?batchNo=" + batchNo);
client.executeMethod(method);
System.out.println(method.getResponseBodyAsString());
method.releaseConnection();
return true;
HttpClient client = new HttpClient();
HttpMethod method = new GetMetho("http://192.168.2.11/LCCCDealServlet?batchNo=" + batchNo);
client.executeMethod(method);
System.out.println(method.getResponseBodyAsString());
method.releaseConnection();
return true;
本文介绍了一种使用Java的HttpClient库实现HTTP请求的方法。通过构造HttpClient实例,并设置Get方法来访问特定URL(包含动态参数),可以获取服务器响应并输出。之后确保连接资源得到释放。
1765

被折叠的 条评论
为什么被折叠?



