Hi All,
I ran a code from one of your post as below by Oleg with two different urls.
url 1: http://www.au.yahoo.com/
url 2: https://rtdsl-uat.princetonecom.com/pngRTDS/scanline/xml
url 1 gave the same result as your post, while url 2 always succeeded and
output the following even I set timeout to 100 milliseconds. How can I set
timeout for this https url? Please help.
Thanks,
Ben
---------------------------------------------------
Code (by Oleg):
HttpClient client = new HttpClient();
client.getHttpConnectionManager().getParams().setConnectionTimeout(100);
GetMethod httpget = new GetMethod(url);
try {
client.executeMethod(httpget);
System.out.println(httpget.getStatusLine());
System.out.println(httpget.getResponseBodyAsString());
} finally {
httpget.releaseConnection();
}
---------------------------------------------------
......elapsed 0 seconds
......elapsed 5 seconds
HTTP/1.1 200 OK
<?xml version="1.0" ?>
<RESPONSE version="1.0">
....
</RESPONSE>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]