Use the HTTPS protocolTag(s): Networking

For Applets, both IE and NN have implemented https in their class so just use it exactly as you would for a regular http URL.
URL ssl = new URL(";
InputStream is = ssl.openStream();

For application, take a look at the Sun's Secure Socket Extension (JSSE).

Before connecting with a secure URL, we must do this first :;

A useful link for that is this JavaWorld's Tip

Since JDK 1.4, the JSSE package is included so you don't have to add anything special. However you may need to import the certificate from the host (that is the server that you are connecting to using the https: protocol). One easy way to do this is to open a secured page (say with IE, click on the SSL-symbol (bottom right) and exported the key into the file "c:\cacerts.ce". Go in "%java_home%\bin" and type this:

keytool -import -v -alias meincert -trustcacerts -file c:\

blog comments powered by Disqus