We have an intranet link which can be accessed only if the configuration script (http://XXXXX/proxy.pac) is selected in IE. I want to connect to this link using jakarta HttpClient. I am getting connection refused error when tried to connect using proxy server mentioned in .pac file. ----------- loginURL = "http://login.url.com"; proxyURL = "proxyserver.com";
client = new HttpClient(); hostConfig = client.getHostConfiguration(); hostConfig.setProxy(proxyURL, 8080); get = new GetMethod(loginURL); statusCode = client.executeMethod(get); -------
Is it possible to open this link using configuration script directly from HttpClient?
If so, could someone please provide a sample code to use this configuration script and connet to the link. I have searched for solution in google, but no where available.