This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hi I am trying to open a web page using HttpURLConnection. I was getting ConnectExecption. I thought may be this is because I am behind a proxy.
I tried using a couple of approaches.. some of them from a thread on javaranch itself.
This is the code that i tried using... i provided proper values to systemSettings.put("http.proxyHost","myproxy.com") ; systemSettings.put("http.proxyPort", "80") ;
public class crawler { public static void main(String args[]) {
try {
//First set the Proxy settings on the System Properties systemSettings = System.getProperties(); systemSettings.put("http.proxyHost","myproxy.com") ; systemSettings.put("http.proxyPort", "80") ;
if you're behind a proxy you should know and use the correct hostname and port for it. Do you really think myproxy.com is correct?
Another problem could be that it's not a proxy but a firewall which is simply blocking outgoing connections on TCP port 80 (HTTP). Are you trying this at home or in a company or what?
Anyway in principle your application is working!
Marco
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.