Posted By:
r_s
Posted On:
Thursday, March 20, 2003 08:00 PM
I'm using the following code to download a web page import java.net.*; import java.io.*; public class URLReader { public static void main(String[] args) throws Exception { URL yahoo = new URL("http://www.yahoo.com"); BufferedReader in = new BufferedReader( new InputStreamReader(yahoo.openStream())); String inputLine; while ((inputLine = in.readLine()) != null) System.out.println(inputLine); in.close(); } } I copy the output from the console and save it to a .html file. I open the file with IE and notice many errors on the page. Most of the table tags are wrong and just about all of the hyperlinks are wrong
More>>
I'm using the following code to download a web page
import java.net.*;
import java.io.*;
public class URLReader {
public static void main(String[] args) throws Exception {
URL yahoo = new URL("http://www.yahoo.com");
BufferedReader in = new BufferedReader( new InputStreamReader(yahoo.openStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
}
}
I copy the output from the console and save it to a .html file. I open the file with IE and notice many errors on the page. Most of the table tags are wrong and just about all of the hyperlinks are wrong. Why is the source code for the page being changed???
<<Less