atom feed17 messages in org.apache.hc.httpclient-usersRe: How to set proxy information in h...
FromSent OnAttachments
nitya vyasAug 29, 2007 10:44 am 
dh...@lexmark.comAug 29, 2007 12:57 pm 
nitya vyasAug 30, 2007 2:00 am 
Roland WeberAug 31, 2007 10:47 am 
Puneet LakhinaSep 5, 2007 11:46 am 
nitya vyasSep 12, 2007 4:55 am 
Tobias MeierSep 12, 2007 7:36 am 
nitya vyasSep 13, 2007 5:15 am 
Roland WeberSep 14, 2007 7:25 am 
nitya vyasSep 17, 2007 1:01 am 
nitya vyasSep 17, 2007 11:22 pm 
nitya vyasSep 18, 2007 10:49 pm 
Roland WeberSep 19, 2007 10:48 am 
nitya vyasSep 19, 2007 11:09 am 
Roland WeberSep 19, 2007 11:21 am 
nitya vyasSep 20, 2007 9:53 pm 
Roland WeberSep 21, 2007 11:26 pm 
Subject:Re: How to set proxy information in httpClient object from browser
From:Roland Weber (ossf@dubioso.net)
Date:Sep 14, 2007 7:25:59 am
List:org.apache.hc.httpclient-users

nitya vyas wrote:

I found out that the problem lies in only one line ..

System.setProperty("java.net.useSystemProxies","true");

if i dont do this, the server will respond. or if i immediately write System.setProperty("java.net.useSystemProxies","false"); after that line only nothng in between then only it works and server responds..

Implement a ProtocolSocketFactory [1]. Use the Socket(Proxy) constructor [2] with argument Proxy.NO_PROXY [3], then connect. Mark Claassen did that before [4].

hope that helps, Roland

[1]
http://jakarta.apache.org/httpcomponents/httpclient-3.x/apidocs/org/apache/commons/httpclient/protocol/ProtocolSocketFactory.html [2]
http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#Socket(java.net.Proxy) [3] http://java.sun.com/j2se/1.5.0/docs/api/java/net/Proxy.html#NO_PROXY [4]
http://mail-archives.apache.org/mod_mbox/jakarta-httpclient-user/200701.mbox/%3C012a01c73f2d$d9b897a0$19c909c0@K9%3E