Hi,
I use HttpClient 3.1.
I use the following code :
GetMethod httpGet;
protected HttpClient client;
client = new HttpClient(new MultiThreadedHttpConnectionManager());
httpGet = new GetMethod(url);
int statusCode = client.executeMethod(httpGet);
if (statusCode == HttpStatus.SC_OK) {
InputStream is = httpGet.getResponseBodyAsStream();
net.htmlparser.jericho.Source source = new
Source(convert(document1));
numOfElemets = source.getAllElements().size();
System.out.println("numOfElemets " + numOfElemets);
}
When i out the above code in for loop ,it prints different number of elements
in
each loop(sometimes the same not always).
It seems the stream that retrieve by GetMethod is different in each request for
the same URL.
It is a big problem for me.Do you know why this happens?
Best Regards.
Khosro.