I got the following exception when try to post a request to a http server:
Here is the code I used
URL url = new URL(
\"https://www.abc.com\"
If you want to ignore the certificate all together then take a look at the answer here: Ignore self-signed ssl cert using Jersey Client
Although this will make your app vulnerable to man-in-the-middle attacks.
Or, try adding the cert to your java store as a trusted cert. This site may be helpful. http://blog.icodejava.com/tag/get-public-key-of-ssl-certificate-in-java/
Here's another thread showing how to add a cert to your store. Java SSL connect, add server cert to keystore programmatically
The key is:
KeyStore.Entry newEntry = new KeyStore.TrustedCertificateEntry(someCert);
ks.setEntry("someAlias", newEntry, null);