From: mahesh.sanka <mah...@es...> - 2014-12-09 11:55:05
|
Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.val idator.ValidatorException: PKIX path building failed: sun.security.provider.cert path.SunCertPathBuilderException: unable to find valid certification path to req uested target class Connect { public static void main(String[] args)throws Exception { final WebClient webClient = new WebClient(); //webClient.setRedirectEnabled(true); webClient.getOptions().setJavaScriptEnabled(false); webClient.getOptions().setCssEnabled(false); webClient.getOptions().setRedirectEnabled(true); final HtmlPage page1 = webClient.getPage("https://192.168.4.115/acsadmin/login.jsp"); final HtmlForm form = page1.getFormByName("cuesLoginForm"); final HtmlTextInput userName = form.getInputByName("j_username"); final HtmlTextInput password = form.getInputByName("j_password"); userName.setValueAttribute("acsadmin"); password.setValueAttribute("Passw0rd"); final HtmlSubmitInput button = form.getInputByName("cuesLoginSubmitButton"); final HtmlPage page2 = button.click(); webClient.closeAllWindows(); } } -- View this message in context: http://htmlunit.10904.n7.nabble.com/Error-while-accessing-https-web-site-tp35067.html Sent from the HtmlUnit - General mailing list archive at Nabble.com. |