You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by JY...@aol.com on 2006/01/28 19:50:09 UTC
How do you simulate clicking on a hyperlink?
Within a Java application, I am trying to simulate the browser action of
simply clicking on a hyperlink and being taken to another web page.
Here is an example of what I would do with my browser:
1) Connect to the URL: _http://www.tsp.gov/account/index.html_
(http://www.tsp.gov/account/index.html)
2) On the web page given in 1) there is a hyperlink that I click, which
takes me to the logon page,
_https://tspweb2.tspsec.tsp.gov/login2.htm_
(https://tspweb2.tspsec.tsp.gov/login2.htm)
How do I simulate 1) and 2) with HttpClient?
Jerry Yurow
Re: How do you simulate clicking on a hyperlink?
Posted by Roland Weber <ht...@dubioso.net>.
Hi Jerry,
JYurow@aol.com wrote:
> 1) Connect to the URL: _http://www.tsp.gov/account/index.html_
> (http://www.tsp.gov/account/index.html)
>
> 2) On the web page given in 1) there is a hyperlink that I click, which
> takes me to the logon page,
>
> _https://tspweb2.tspsec.tsp.gov/login2.htm_
> (https://tspweb2.tspsec.tsp.gov/login2.htm)
>
> How do I simulate 1) and 2) with HttpClient?
1. Send a request to fetch http://www.tsp.gov/account/index.html
2. Send a request to fetch https://tspweb2.tspsec.tsp.gov/login2.htm
HttpClient is not a browser, nor any other kind of interactive
application. It's a package to send HTTP request and receive the
responses. Just observe the sequence of requests generated by the
browser, then implement the same sequence with HttpClient.
cheers,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org