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/[EMAIL
 PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to