Protocol handler not found : https

I have Java program running standalone in a Linux enviornment.  It is attempting to connect to an https URL using an instance of: java.net.URLconnection.

The program worked find as a Java servlet running under Tomcat on the same Linux box.  When I moved it to standalone the attempts to connect to the https URL fails : Protocol handler not found : https

My JDK version is : jdk1.5.0_05

My PATH variable is set to : /usr/java/jdk1.5.0_05/bin
My JAVA_HOME variable is set to : /usr/java/jdk1.5.0_05

RickFischerAsked:
Who is Participating?
 
ahoffmannCommented:
why not simply using httpclient instead of java.net.URLconnection?
0
 
zgrpCommented:
Hello,

The problem is that java.net.URLconnection is used to connect with HTTP (Hyper Text Transport Protocol).

While to connect to HTTPS, wich use SSL (Securre Socket Layer), you should use javax.net.ssl.HttpsURLConnection, check:

http://java.sun.com/j2se/1.5.0/docs/api/javax/net/ssl/HttpsURLConnection.html

Hope this help,

Cheers
0
 
zgrpCommented:
Helped ?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.