可创建HttpClient实例,并用它来执行一个GetMethod对象。调用另一个应用的Servlet
- HttpClient client = new HttpClient();
- String url = http://127.0.0.1:8080/hello;
- HttpMethod method = new GetMethod(url);
- try{
- Client.executeMethod(method);
- }catch(Exception e){...}

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