What version of the jdk are you using? in jdk1.4+ all i need to do is:

System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.ww
w.protocol");

and then i create my URL 

new URL("https://where-ever.com";)

Make sure that the server has a valid ssl certificate, because any problems
with it will give you an error. Also, you can turn on SSL debugging by
setting the system property like so:

System.setProperty("javax.net.debug","ssl"); // or "all" for everything.

hope this helps,
mark



-----Original Message-----
From: Stuart Stephen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 11:46 AM
To: Tomcat Users List
Subject: HTTPS URL in Tomcat


Hi all,

I keep getting a MALFormedURLException in my servlet which is trying to
connect to a URL which begins 'https://'. However, I keep getting:

java.net.MalformedURLException: unknown protocol: https
        at java.net.URL.<init>(Unknown Source)
        at java.net.URL.<init>(Unknown Source)
        at java.net.URL.<init>(Unknown Source)

I've put
'-Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol' in my
tomcat startup. Also I have checked the java.security file and the line
'security.provider.3=com.sun.net.ssl.internal.ssl.Provider' is there.

I have included all of the com.sun.net.*.*.*.*.*.* directories as a
precaution yet the error is still cropping up?

Why am I still getting these errors and how can I fix this?

Thanks for any help that is supplied!

Stuart Stephen


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to