尝试连接到J2ME项目中的网络时出现以下错误
Exception java.io.IOException: Error initializing HTTP tunnel connection:
HTTP/1.1 502 Proxy Error ( The specified Secure Sockets Layer (SSL) port is
not allowed. ISA Server is not configured to allow SSL requests from this port.
Most Web browsers use port 443 for SSL requests. )我应该在设置或首选项中进行一些更改吗?
我正在使用eclipse
发布于 2012-02-27 17:48:09
大多数HTTP代理服务器(显然包括ISA server )限制它们允许使用HTTP的端口,CONNECT是允许建立到HTTP服务器的代理连接的HTTP动词。通常唯一允许的端口是443 (https的默认端口)。
我假设您在URL中显式使用了一个不同的URL。
发布于 2012-02-27 11:32:02
您可以按照以下方式在Java中使用Proxy,这里是link。
HTTPConnection.setProxyServer("my.proxy.dom", 8008);
HTTPConnection.dontProxyFor("localhost");
HTTPConnection.dontProxyFor(".mycompany.com");
AuthorizationInfo.addBasicAuthorization("my.proxy.dom", 8008, realm, user, passwd);
...
HTTPConnection con = new HTTPConnection(...);https://stackoverflow.com/questions/9428675
复制相似问题