如何在我们在Firefox网络设置中设置的httpclient中设置无代理?

时间:2016-02-02 14:33:04

标签: java apache proxy httpclient wcs

如何在httpclient中设置不像我们在Firefox网络设置中设置的代理?

我已将java网络设置设置为控制面板中的默认浏览器设置以及为什么它也没有反映出来?

对我来说,当我设置办公室代理时,第三方服务呼叫在restclient中工作,没有代理和超时。当我从IBM WCS代码调用时,会出现以下异常。

[2/2/16 14:49:27:613 CET] 0000000a SystemErr     R java.net.ConnectException: Connection timed out: connect
[2/2/16 14:49:27:614 CET] 0000000a SystemErr     R  at java.net.PlainSocketImpl.socketConnect(Native Method)
[2/2/16 14:49:27:615 CET] 0000000a SystemErr     R  at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:412)
[2/2/16 14:49:27:615 CET] 0000000a SystemErr     R  at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:271)
[2/2/16 14:49:27:615 CET] 0000000a SystemErr     R  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:258)
[2/2/16 14:49:27:616 CET] 0000000a SystemErr     R  at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:376)
[2/2/16 14:49:27:616 CET] 0000000a SystemErr     R  at java.net.Socket.connect(Socket.java:546)
[2/2/16 14:49:27:616 CET] 0000000a SystemErr     R  at com.ibm.jsse2.SSLSocketImpl.connect(SSLSocketImpl.java:567)
[2/2/16 14:49:27:616 CET] 0000000a SystemErr     R  at com.ibm.jsse2.SSLSocketImpl.<init>(SSLSocketImpl.java:184)
[2/2/16 14:49:27:617 CET] 0000000a SystemErr     R  at com.ibm.jsse2.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:1)
[2/2/16 14:49:27:617 CET] 0000000a SystemErr     R  at com.ibm.websphere.ssl.protocol.SSLSocketFactory.createSocket(SSLSocketFactory.java:654)
[2/2/16 14:49:27:617 CET] 0000000a SystemErr     R  at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:82)
[2/2/16 14:49:27:618 CET] 0000000a SystemErr     R  at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:127)
[2/2/16 14:49:27:619 CET] 0000000a SystemErr     R  at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
[2/2/16 14:49:27:619 CET] 0000000a SystemErr     R  at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
[2/2/16 14:49:27:619 CET] 0000000a SystemErr     R  at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
[2/2/16 14:49:27:619 CET] 0000000a SystemErr     R  at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
[2/2/16 14:49:27:620 CET] 0000000a SystemErr     R  at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)

2 个答案:

答案 0 :(得分:0)

您可以通过以下方式将域设置为不通过WAS中的代理:

进入WAS管理控制台,选择应用程序服务器 - &gt;我的我的服务器是server1-&gt; Java和流程管理 - &gt;流程定义 - &gt; Java虚拟机 - &gt;自定义属性

创建名为http.nonProxyHosts的属性,并为该值放置您不希望通过代理服务器传递的域。

答案 1 :(得分:-1)