Jaun,
how did you install the JSSE. Did you put the jar in <jre_home>/lib/ext, and
did you update the <jre_home>/lib/security/java.security to reference the
new provider?
This is code that I have that works fine,
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
System.setProperty("java.protocol.handler.pkgs,
"com.sun.net.ssl.internal.www.protocol");
// String home = System.getProperty("user.home");
// System.setProperty("javax.net.ssl.trustStore", home + "/.keystore");
java.net.URL url = new java.net.URL("https://localhost");
java.net.HttpURLConnection con = (java.net.HttpURLConnection)
url.openConnection();
Kevin Jones
DevelopMentor
www.develop.com
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Juan
> Arraiza
> Sent: 15 January 2001 15:59
> To: [EMAIL PROTECTED]
> Subject: HTTPS
>
>
> Hi all,
> I'm really having a bad time trying to establish a connection to a
> resource that is in a https server.
>
> If I try the following code:
>
> URL url = new URL("https://www.myhttpsserver/myresource");
>
> it throws a MalformedURLException because it doesn´t recognice the https
> as a valid protocol.
>
> I've heard that installing JSSE1.0.2 and adding a few lines to my code
> could help, but I have not been able to do so. The code I´ve tried is:
>
> System.setProperty("java.protocol.handler.pkgs",
> "com.sun.net.ssl.internal.www.protocol");
> java.security.Security.addProvider( new
> com.sun.net.ssl.internal.ssl.Provider() );
> URL url = new URL("https://www.myhttpsserver/myresource");
>
>
> Do any of you have any further ideas?
>
> Thanx,
>
> Juan
>
> __________________________________________________________________
> _________
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html