Does anyone know how to parse an https URL to the SAXBuilder as an argument.
URL url = new URL("https:anyURL");
SAXBuilder parser = new SAXBuilder();
Document doc = null;
doc = parser.build(url);
This code segment works for an http URL. But when it comes to https URL this gives an java.io.IOException: Hostname was not verified. Any help would be grea开发者_StackOverflow社区tly appreciated.
You will have to provide the Key Store
path inorder to call a secure URL:
Example:
System.setProperty("javax.net.ssl.trustStore", "C:\\certificates\\xxx.jks");
精彩评论