title: Query on jvm truststore and jssecacerts file?
body: <p>i have two https web applications app1 and app2 installed on two different tomcats t1 and t2(t1 and t2 are on different machines). when in app1 
  i make an url connection to app2 i get the SSL handshake error. The reason is i am using the self signed certificate in app2 which is not present
  in app1 jvm truststore. So proper approach to fix it  install the self signed certificate in      JAVA-HOME/jre/lib/security . To do the
  same , I have followed the steps given at <a href="http://www.mkyong.com/webservices/jax-ws/suncertpathbuilderexception-unable-to-find-valid-certification-path-to-requested-target/" rel="nofollow">http://www.mkyong.com/webservices/jax-ws/suncertpathbuilderexception-unable-to-find-valid-certification-path-to-requested-target/</a>.
  Same steps are suggested across the different forums. But still i get the same SSL handshake error which is</p>
  
  <pre><code>javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path   building failed: sun.security.
  provider.certpath.SunCertPathBuilderException: unable to find valid certification path to   requested target
  at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
  </code></pre>
  
  <p>Though it i got rid of this SSLHandshakeException by mentioning below parameters in JVM trustore.
  -Djavax.net.ssl.trustStore=C:.keystore
  -Djavax.net.ssl.trustStorePassword=changeit</p>
  
  <p><strong>My question here is why first approach(which is proper approach) i.e putting the jssecacerts file under /lib/security is not working?</strong> 
  Another point is what is different between first and second approach ?</p>