Hello everyone,
i got a problem with the HttpClient Component. I poll a website every 5
minutes to track the changes of it. But when it changes the reponse
string does not change. I'm using a class which implements the runnable
interface and use ScheduledThreadPoolExecutor for executing the thread
every specified time. I'm ignoring all cookies with a self written
CookieSpecFactory.
client = new DefaultHttpClient();
((DefaultHttpClient)
client).getCookieSpecs().register(IgnoringSpecFactory.IGNORE, new
IgnoringSpecFactory());
client.getParams().setParameter("http.protocol.cookie-policy",
IgnoringSpecFactory.IGNORE);
Due a debug session i know:
* The Runnable instance is the same at every pass.
* The HttpClient instnace is the same ar every pass.
The only problem is, that the content do not change, although the
website changes. The rest of the code in the run-Mehthod:
HttpGet get = new HttpGet(url);
ResponseHandler<String> handle = new BasicResponseHandler();
String response = client.execute(get, handle);
client.getConnectionManager().closeExpiredConnections();
I'm looking forward for some hints.
Regards,
Benjamin
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]