hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeffrey Porter" <PORTE...@WMGMAIL.wmg.warwick.ac.uk>
Subject RE: Connection timed out - proxy already set... ?
Date Tue, 10 Oct 2006 16:37:35 GMT

Roland I could kiss ya!

Well I'll reserve judgment till me meet. But your suggestion is correct!

I've got this..


PostMethod formPost = new PostMethod("http://" +
serverAddress+":"+serverPort + "/theForm/j_security_check");

formPost.addRequestHeader("Referer", "http://" +
serverAddress+":"+serverPort + "/client/huginPathReceiverServlet");
		
formPost.addParameter("j_username", userID);
formPost.addParameter("j_password", userPassword);

client.executeMethod(formPost.getHostConfiguration(), formPost, state);

I'm trying to login to a JBoss secured page.

Can I replace it with this?

client.executeMethod(client.getHostConfiguration(), formPost, state);



-----Original Message-----
From: Roland Weber [mailto:http-async@dubioso.net] 
Sent: 10 October 2006 17:08
To: HttpClient User Discussion
Subject: Re: Connection timed out - proxy already set... ?

Hi Jeff,

you should take care of this problem first:

> 2006/10/10 15:41:05:312 BST [WARN] SimpleHttpConnectionManager -
> -SimpleHttpConnectionManager being used incorrectly.  Be sure that
> HttpMethod.releaseConnection
> 
> () is always called and that only one thread and/or method is using
this
> connection manager at a time.

The first request is sent via a port 3128 all right. On the second
request, HttpClient tries to connect to port 80 directly. Are you
by any chance using an HttpClient.execute(...) method with an explicit
host configuration argument?

cheers,
  Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message