Hello, Eugene, thanks for your responses to my questions. I tried you code; however, something gets screwed up:
http://www.netsol.com/cgi-bin/whois/whois is the web site where I enter the query data in the text field. Suppose I enter; say, yahoo.com, and click on the GO button, I get this HTML web page with the link shown below in the address bar:
http://www.netsol.com/cgi-bin/whois/whois?STRING=yahoo.com&SearchType=do&STRING2.x=32&STRING2.y=10 And this is the page I am going to search the information I need.
I used your code; however, the post data are not written to the URL. I only get the "host web page". And I got the HTML code of that whole page printed to the console.
I experimented a little, and found that if I enter
http://www.netsol.com/cgi-bin/whois/whois?STRING=yahoo.com in the address bar, I am directed to an error page:
http://www.netsol.com/en_US/common/error.jhtml and if I type
http://www.netsol.com/cgi-bin/whois/whois?STRING=yahoo.com&SearchType=do in the address bar, I will be able to get the expected web page.
Therefore, I must try to append &SearchType=do to the postData in the Java program. Nonetheless, the code shown below does not seem to work:
What is the correct way to do it?
[ January 03, 2003: Message edited by: JiaPei Jen ]
[ January 04, 2003: Message edited by: JiaPei Jen ]
[ January 04, 2003: Message edited by: JiaPei Jen ]