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

Viewing HTML source problem..  RSS feed

harish raghavan
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello people...i have a doubt...i have done a program on storing the HTML source of a system uses Direct IP and i got the output...but when i execute in LAN i get the exception Source genration error...i found the problem is due to proxy connection...can u ppl let me know how to setup proxy and make this code work...please modify this code and send me so that it works on a LAN environment...ASAP please

public int source(String linkpass)
StringBuffer strBuf = new StringBuffer();
URL page;
InputStreamReader in;
BufferedReader data;
String line;
URLConnection conn = null;
page = new URL(linkpass);
conn = page.openConnection();
in = new InputStreamReader(conn.getInputStream());
data = new BufferedReader(in);
while ((line = data.readLine()) != null)
strBuf.append(line + "\n");
catch(Exception e)
System.out.println("Source generation error");
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!