Regarding connection timed out exception
Hi all,
I need a help. I am using URL class to connect Google
try
{
URL url = new URL("http://www.google.com");
URLConnection myConn = (HttpURLConnection)url.openConnection();
myConn.setRequestProperty("User-agent","");
buffer = new BufferedReader(new InputStreamReader(myConn.getInputStream()));
sb1.append(line);
}//string buffer while closing
buffer.close();
}
catch(Exception e)
{
System.out.println("exception1 in url is "+e);
}
I am getting java.net.ConnectException:Connection timed out. please any one help me how i can resolve it.
Regards,
Rama

