• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

org.apache.commons.httpclient response not getting

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
i am using org.apache.commons.httpclient with GetMethod

when i am giving same url in for loop
after some iterations the system is hanging at
method.getResponseBodyAsSting() or at method.getResponseBodyAsString();
the code is like this
for(int i=0; i<200 ; i++) {
HttpClient client = new HttpClient();
GetMethod method = new GetMethod(someurl);
int statuscode = client.executeMethod(method);
String str = method.getResponseBodyAsString(); // the system is
// hanging here
System.out.println(statuscode);
System.out.println(str);
method.releaseConnection();

}

can any body please give the reason
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to Other Open Source Projects...
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please do not post the same question to multiple forums especially after a moderator instructs you not to .
reply
    Bookmark Topic Watch Topic
  • New Topic