commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@bluewin.ch>
Subject Re: httpclient --> java.net.ConnectException: Connection Refused
Date Sun, 20 Jun 2004 11:58:27 GMT
Sez,
Can it be that the firewall blocks the direct connections to external
sites and your browser is configured to use a proxy?

Oleg


On Fri, 2004-06-18 at 07:48, Sez wrote:
> Hi people,
> 
> I have this code
> ////////////////////////////////////////////////////	
> 		Protocol easyhttps = new Protocol("https", new
> EasySSLProtocolSocketFactory(), 443);
> 		 
> 		 HttpClient client = new HttpClient();
> 		 client.getHostConfiguration().setHost("www.verisign.net",
> 443, easyhttps);
> 		 // use relative url only
> 		 GetMethod httpget = new GetMethod("/");
> 		try{
> 			 client.executeMethod(httpget);
> 		}catch (java.io.IOException e)
> 		{
> 			System.out.println(e);
> 			e.printStackTrace();
> 		}
> 	    finally {
> 	        // release any connection resources used by the method
> 	        httpget.releaseConnection();
> 	    }
> ////////////////////////////////////////////////////
> 
> This code fails in client.executeMethod with java.net.ConnectException:
> Connection refused.
> 
> >From my server i can connect to verisign with my netscape. So, it isn't
> problem with firewall.
> I inspect the traffic with ethereal and i didn't see a connection to
> verisign site...
> 
> I am with deseperated...
> Some ideas?
> 
> 
> Thanks
> SERGI
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 


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


Mime
View raw message