This content has been marked as final. Show 1 reply
In other words it's the same as before just with https: in the protocol.
URL httpsURL = new URL("https://yourhost:yourport/yourpath/...");
Ignore any suggestion you see here or elsewhere about setting protocol handler packages or providers unless you are using Java 1.3 or 1.2.
the server has to have a valid certificate in its keystore that is trusted by the client's truststore, and this can get complicated: you may have to export from the server's keystore, import to the client's truststore, and set the SSL truststore properties - see the Javadoc/Guide to Features/Security/JSSE Reference Guide. There are also programmatic ways to do all that but they're unnecessary 99% of the time,