Hi,
I've returned to my attempts to use HttpClient to log-in to my bank's
website. I post my log-in variables, and execute the post method to do the
log-in. I get the following warning and stacktrace when executed:
WARNING: Recoverable exception caught but MethodRetryHandler.retryMethod()
returned false, rethrowing exception
org.apache.commons.httpclient.HttpRecoverableException:
java.net.SocketException: Connection reset
at
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.jav
a:1962)
at
org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBase.j
ava:2653)
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:108
7)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:643)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:497)
Before this, I was getting a redirect response taking me to a failed login
page. I had noticed that on the log-in page itself, there is some
javascripting that adds two cookies. Once I manually create those Cookies
and added them to my HttpClient object's HttpState attribute, then re-tried
the log-in attempt, I receive this connection reset error. It seems that
once I had added those two cookies, which are required, it is making the
attempt to establish my log-in session.but this appears to be preventing it
from happening. Any tips on what could be done here or what is happning to
my connection? I'm using JRE 1.5 and v2.0.2 for HTTPClient.
Thanks,
Brett