I have developed an application in Java.
- A database with a table
studentwith columnsuserid,password,name,address. - A
login.htmlpage asking forusernameandpasswordand having submit button. There is a<form action="display.jsp" method="post">. - On
display.jspI am printing name and address.
This is working fine in browser.
But now I want to make a simple Java application in which I will pass the URL of my login.html running on localhost. And that Java application should fill in the form, click that button and print value of name and address on console. It will print name and address of all 20 students when I will use while loop from 1 to 20.
How can I achieve this?
This seems like a undesirable way to achieve this but if you must, you can just use something like Apache Http Client…
http://hc.apache.org/httpcomponents-client-ga/index.html