This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes malformedUrl exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "malformedUrl exception" Watch "malformedUrl exception" New topic
Author

malformedUrl exception

michael yue
Ranch Hand

Joined: Nov 20, 2003
Posts: 204
My program tries to access a servlet in an https envronment and produce an error java.net.MalformedURLException unknown protocol https.
I also set property on top the program

System.setProperty("javax.net.ssl.trustStore","C:/j2sdk1.4.0_01/jre/bin/test");
System.setProperty("javax.net.ssl.trustStorePassword","test123");

where test is the keystore.

What else should I do to make my program accept https protocol. Thanks
pascal betz
Ranch Hand

Joined: Jun 19, 2001
Posts: 547
hi

you probably need to register a handler for the HTTPS protocol and (depending on your java version) add some jar files to your classpath. perhaps this article helps:
http://www.javaworld.com/javaworld/javatips/jw-javatip96.html

cheers

pascal
 
 
subject: malformedUrl exception
 
Similar Threads
Unable to tunnel through proxy. Proxy returns "HTTP/1.0 407 Proxy Authentication Requ
Unable to tunnel through proxy. Proxy returns "HTTP/1.0 407 Proxy Authentication Requ
Certificate question
SSL settings for Stand-Alone Java Application in Sun JRE
How do you create a webservice client using WSDL2Java which uses SSL?