Hello people...i have a doubt...i have done a program on storing the HTML source of a webpage...my 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; try { page = new URL(linkpass); conn = page.openConnection(); conn.connect(); 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"); } }