Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

connection exception...  RSS feed

 
mustang india
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to get connected to a particular URL and download a file.
The code I am using is
url = new URL(_strUrl);
System.out.println("got connection");
System.setProperty("http.proxySet","true");
System.setProperty("http.proxyHost","167.56.256.240");
System.setProperty("http.proxyPort","8080");
BufferedReader in = new BufferedReader(
new InputStreamReader(
url.openStream()));
String line = "";
while((line = in.readLine()) != null) {
System.out.println(line);
}
in.close();
I get a connection exception stating that ther is a time-out. I am behind a fire wall.
Can anybody pl suggest what is the problem.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!