May 2001
Intermediate to advanced
1088 pages
30h 13m
English
One of the most popular uses of JSSE is in the area of HTTPS requests. That is, you want to write a Java program that accesses a Web server via HTTPS—either to retrieve data or to send data. Although you could write a socket program to mimic the HTTP protocol over SSL (that's all HTTPS really is—HTTP over an SSL socket connection), there's a better way.
JSSE comes with an HTTPS protocol handler that plugs into the Java URL framework to recognize requests for https URLs.
Listing 35.8 shows a program that performs an HTTPS GET request using the URL class.
package usingj2ee.ssl;import java.io.*;import java.net.*;public class GetHTTPS{ public static void main(String[] ... |
Read now
Unlock full access