I am trying to open one htttps website. Url is for ex. https://x.xx.xx.xx/. I have written the blow code.
String url = "https://x.xx.xx.xx/";
URL obj = new URL(url);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
// optional default is GET con.setRequestMethod("GET");
//add request header con.setRequestProperty("User-Agent", USER_AGENT);
But its throwing the exception "javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative" . I am new to Java. Can anyone help me how to resolve the above issue.
have imported certificate sucessfuly, still getting the exception, can anyone please help me?
Have impor