Use HTTPS in java Java client code
843811Nov 3 2003 — edited Nov 9 2003Hi,
I am trying to access a XML resource on a Tomcat server that uses https protocol. Using the URL class - this will not work because it does not support https. Therefore, Java Secure Sockets Extension (JSSE) version 1.0.1 can be used to overcome this reading the below link on the web:
http://www.javaworld.com/javaworld/javatips/jw-javatip96.html
However, I downloaded version 1.0.3 (latest) I think of JSSE and when trying to execute the below code:
System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
An error occurred for the second line, stating that the Security class could not be found. I put the package under my class path so that it can fing the .jar files. I searched for the class, and I could not find it under the lib directory .jar files!
Could the reason for this be that the Security class does not exist in the new release. If so, how do I overcome my problem of trying to access a resource that is on, or uses a https protocol?
Thanks for your help.