Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using JSSE 1.0.2 in JDK 1.3.0 to access HTTPS site

843811Jan 23 2002 — edited Jul 25 2002
I am writing a client application to access a secure site (using https protocol). I downloaded JSSE 1.0.2 and followed the documentation on how to access a https site. However I am still getting a MalformedURLException: protocol unknown: https.

Here is my code


import java.io.*;
import java.net.*;
import java.util.*;
import java.security.*;

public class Simple
{
public static void main(String[] args) throws Exception
{
System.setProperty(
"java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");

Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

URL url = new URL("https://intdev:8334/is/index.jsp");

BufferedReader in = new BufferedReader(
new InputStreamReader(
url.openStream()));

String inputLine;

while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);

in.close();

}



Regards,
Ferdie Say
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 22 2002
Added on Jan 23 2002
9 comments
494 views