How can my application or applet programmatically use HTTPS to talk to a servlet? Can I do it with just the Java 2 SDK?

Tim Rohaly

In order to use secure sockets, you need an SSL implementation. this is not provided in the Java 2 SDK.

If you are running an applet, the major browsers provide support for HTTPS through the class - simply specify a protocol of "https" in your URL string and the details are handled for you.

If you are running a standalone application, or want to use SSL over your own sockets and avoid using URL or URLConnection, then you need to obtain an implementation of the Java Secure Socket Extension, or JSSE.

Sun provides a reference implementation of JSSE, along with sample programs, which you can download from It comes in both a "domestic version" (US/Canada) and an "export version" (all other countries).

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact