Re: problem with URLConnection behind a firewall



"vj" <mr.vaibhavjain@xxxxxxxxx> wrote in news:1163573095.757240.204140
@f16g2000cwb.googlegroups.com:

uc.setRequestProperty("Proxy-Authorization", "Basic " + encoded);


You need to set some System properties since a proxy is used :

Properties systemSettings = System.getProperties();
systemSettings.put("http.proxyHost","proxy.mydomain.local") ;
systemSettings.put("http.proxyPort", "80") ;

see http://www.rgagnon.com/javadetails/java-0085.html

Bye.
--
Real Gagnon from Quebec, Canada
* Looking for Java or PB code examples ? Visit Real's How-to
* http://www.rgagnon.com/howto.html
.



Relevant Pages