From: gaurab.pradhan <mer...@gm...> - 2015-05-21 08:52:49
|
Dear Ahmed, Thanks for your reply, yes i have subscribe. This is not my website, i want to parse the site but i getting above mention exception. WebClient client = new WebClient(BrowserVersion.FIREFOX_24); HtmlPage homePage = null; String url = "http://www.freelake.org/pages/Freetown-Lakeville_RSD/Departments/Director_of_Financial_Operatio"; try { client.getOptions().setUseInsecureSSL(true); client.setAjaxController(new NicelyResynchronizingAjaxController()); client.getOptions().setThrowExceptionOnFailingStatusCode(false); client.getOptions().setThrowExceptionOnScriptError(false); client.waitForBackgroundJavaScript(30000); client.waitForBackgroundJavaScriptStartingBefore(30000); client.getOptions().setCssEnabled(false); client.getOptions().setJavaScriptEnabled(true); homePage = client.getPage(url); synchronized (homePage) { homePage.wait(25000); } System.out.println(homePage.asXml()); } catch (Exception e) { e.printStackTrace(); } Thanks -- View this message in context: http://htmlunit.10904.n7.nabble.com/How-to-handle-Too-much-redirect-tp36130p36135.html Sent from the HtmlUnit - General mailing list archive at Nabble.com. |