P
Paul B
Hi,
I am trying to write a program that would move between html links on a
web site
(HTTPS), so far I am able to connect to the site pass the username and
password.
However the next time I try to move to a link which appears in the web
site I can not get the correct information to be returned.
Here is what I am trying to achive.
// Get the page with username and password parameters.
URL site = URL new("https://www.test.com/webapp/Link/login.do?username=user&password=name");
// Setup buffer to read the information
BufferedReader in = new BufferedReader(
new InputStreamReader(
site.openStream()));
// String to hold the information.
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
// Know trying to go to a link in the page.
URL site2 = URL new("https://www.test.com/webapp/Link/test.do");
// Setup buffer to read the information
BufferedReader in2 = new BufferedReader(
new InputStreamReader(
site2.openStream()));
// String to hold the information.
String inputLine2;
while ((inputLine2 = in2.readLine()) != null)
System.out.println(inputLine);
in.close();
in2.close();
Any help is appreciated.
Thanks,
Paul
I am trying to write a program that would move between html links on a
web site
(HTTPS), so far I am able to connect to the site pass the username and
password.
However the next time I try to move to a link which appears in the web
site I can not get the correct information to be returned.
Here is what I am trying to achive.
// Get the page with username and password parameters.
URL site = URL new("https://www.test.com/webapp/Link/login.do?username=user&password=name");
// Setup buffer to read the information
BufferedReader in = new BufferedReader(
new InputStreamReader(
site.openStream()));
// String to hold the information.
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
// Know trying to go to a link in the page.
URL site2 = URL new("https://www.test.com/webapp/Link/test.do");
// Setup buffer to read the information
BufferedReader in2 = new BufferedReader(
new InputStreamReader(
site2.openStream()));
// String to hold the information.
String inputLine2;
while ((inputLine2 = in2.readLine()) != null)
System.out.println(inputLine);
in.close();
in2.close();
Any help is appreciated.
Thanks,
Paul