title: SSL certificate issue javax.net.ssl.SSLHandshakeException:
body: <p>I am trying to open one htttps website. Url is for ex. <a href="https://x.xx.xx.xx/" rel="nofollow">https://x.xx.xx.xx/</a>. I have written the blow code. </p>
  
  <p>String url = "<a href="https://x.xx.xx.xx/" rel="nofollow">https://x.xx.xx.xx/</a>"; </p>
  
  <p>URL obj = new URL(url); </p>
  
  <p>HttpURLConnection con = (HttpURLConnection) obj.openConnection(); </p>
  
  <p>// optional default is GET 
  con.setRequestMethod("GET"); </p>
  
  <p>//add request header 
  con.setRequestProperty("User-Agent", USER_AGENT); </p>
  
  <p>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.</p>
  
  <p>have imported certificate sucessfuly, still getting the exception, can anyone please help me?</p>
  
  <p>Have impor</p>