Hi I am using following code to retrieve response code from https based urls, but when i run a prog it just hangs cont.
code:
import java.net.;
import javax.net.ssl.;
import java.io.*;
class Https2
{
public static void main(String args[]) throws Exception
{
URL u = new URL("https://myurl");
HttpsURLConnection hc = (HttpsURLConnection)u.openConnection();
hc.setConnectTimeout(3000);
hc.setReadTimeout(5000);
System.out.println("Response Code: " + hc.getResponseCode());
hc.disconnect();
}
}
How can make successfull connection to Https urls ?
any help or ideas will be well appreciated.
Thanks