From: Ashutosh S. <ash...@gm...> - 2014-06-18 03:26:28
|
In my standalone java program i am using the code like this: ---------------------------------------------------------------------------------------------------------------------------------------------------- System.setProperty("javax.net.ssl.trustStore", "C:\\Program Files\\OracleJDK16_30b64\\jre\\lib\\security\\cacerts"); System.setProperty("javax.net.ssl.trustStorePassword", "changeit"); File certFile = new File("C:/Program Files/OracleJDK16_30b64/jre/lib/security/cacerts"); URL certURL = null; try { certURL = certFile.toURI().toURL(); } catch (MalformedURLException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } webClient.getOptions().setSSLClientCertificate(certURL, "changeit", "JKS");//"jks" or "pkcs12". ---------------------------------------------------------------------------------------------------------------------------------------------------- It's working all fine. I am using htmlunit-2.14. Now i have to use the same code in Server environment under the container - IBM WAS8 Application Server. For that i need to read the trust store and then make use of it in my code. Is there any help or sample code available for doing that in IBM WAS8 or any other similar kind of containers? Please help. -- With best Regards: Ashutosh Sharma |