title: Java applet using web services over ssl
body: <p>I need to have my java applet use a soap based web service over ssl.
  I know that you can have a servlet act as a go-between/proxy, but I want to have the applet use the web service directly over SSL.
  The problem is supplying the certs to the web server hosting the web services.
  I supplied these Java Applet Runtime Settings via the Java Control Panel:</p>
  
  <blockquote>
    <p>-Djavax.net.ssl.keyStore=<code>&lt;local path to .p12</code>></p>
    
    <p>-Djavax.net.ssl.keyStorePassword=<code>&lt;password</code>></p>
  </blockquote>
  
  <p>I also imported the client cert (.p12) as a Client certificate via the Java Control Panel.
  I was hoping to do:</p>
  
  <blockquote>
    <p>KeyStore ks =
    KeyStore.getInstance("JKS");
    ks.load(new
    FileInputStream(System.getProperty("javax.net.ssl.keyStore"),
       System.getProperty("javax.net.ssl.keyStorePassword").toCharArray());</p>
  </blockquote>
  
  <p>and use the KeyStore from there. But, no dice! It seems that I can't access those properties from within the applet.  I don't want to hardcode the paths, either. 
  I'm using JRE 1.6.0_10</p>
  
  <p>Is there any other way to have the applet use a web service without the servlet proxy approach?  It's likely I'm going down the wrong path.
  Also, I'd be interested in having this work when the web service is different from the one that's hosting the applet, if possible.</p>
  
  <p>BTW: The servlet proxy approach that I want to move away from is spelled out here:
  <a href="http://www.ibm.com/developerworks/xml/library/x-jappws/" rel="nofollow noreferrer">http://www.ibm.com/developerworks/xml/library/x-jappws/</a></p>
  
  <p>Thanks!</p>