Can I use HttpURLConnection class to make HTTPS requests in java 1.2?
No, you need to use JSSE which includes HTTPS support - the ability to access
data such as HTML pages using HTTPS.
Since Java 1.4 it is the part of J2SE. Just take HttpsURLConnection class.
Just for your info - Installing JSSE.
The Java 2 Standard Edition SDK 1.4 and later includes JSSE, so if you use a recent SDK version, you can move on to the Generating a Self-Signed Certificate section. For SDK versions prior to 1.4, you must
download JSEE separately from http://java.sun.com/products/jsse/. Follow the instructions on Sun's site.
The JSSE JAR files can be installed as a so-called installed extension by placing them in the $JAVA_HOME/lib/ext directory (see the JSSE documentation for details), but can also be installed in any
directory you like.
If you do not install them as an installed extension, you must set the JSSE_HOME environment variable to the JSSE installation directory path. On a Windows platform, use the set
command like this:
C:\> set JSSE_HOME=C:\jsse1.0.3_01
10 comments | | Score: 0