I have done reading part , it is just to apply few conditions
this is a code to read html from the passed url ..
if i want to check weather page is loaded fully or not like by checking closing </html> tag present on the page or not..like how we will check it in this code.. i could not be able to capture the right step...and to check if there is any "submit error" kind of word on the page.. how we will do it..
please study it.. and work it out..
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
public class URLConnectionReader {
public static void main(String[] args) throws Exception {
URL yahoo = new URL("http://www.yahoo.com/");
URLConnection yc = yahoo.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(yc
.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null) {
System.out.println(inputLine);
in.close();
}
if (((inputLine = in.readLine()) == null)) {
System.out.println("blank page");
}
}
}
Yogesh

