private static WebConversation createWebConversation() { HttpUnitOptions.setScriptingEnabled(false); return new WebConversation(); }
/** * Resets all options to their default values. */ public static void reset() { _exceptionsOnErrorStatus = true; _parameterValuesValidated = true; _imagesTreatedAsAltText = false; _loggingHttpHeaders = false; _matchesIgnoreCase = true; _checkContentLength = false; _redirectDelay = 0; // TODO move this to ClientProperties _characterSet = HttpUnitUtils.DEFAULT_CHARACTER_SET; _contentType = DEFAULT_CONTENT_TYPE; _postIncludesCharset = false; _exceptionsThrownOnScriptError = true; _customAttributes = null; _javaScriptOptimizationLevel = -1; setScriptEngineClassName( DEFAULT_SCRIPT_ENGINE_FACTORY ); setScriptingEnabled( true ); }
/** * Resets all options to their default values. */ public static void reset() { _exceptionsOnErrorStatus = true; _parameterValuesValidated = true; _imagesTreatedAsAltText = false; _loggingHttpHeaders = false; _matchesIgnoreCase = true; _checkContentLength = false; _redirectDelay = 0; // TODO move this to ClientProperties _characterSet = HttpUnitUtils.DEFAULT_CHARACTER_SET; _contentType = DEFAULT_CONTENT_TYPE; _postIncludesCharset = false; _exceptionsThrownOnScriptError = true; _customAttributes = null; _javaScriptOptimizationLevel = -1; setScriptEngineClassName( DEFAULT_SCRIPT_ENGINE_FACTORY ); setScriptingEnabled( true ); }
/** * Resets all options to their default values. */ public static void reset() { _exceptionsOnErrorStatus = true; _parameterValuesValidated = true; _imagesTreatedAsAltText = false; _loggingHttpHeaders = false; _matchesIgnoreCase = true; _checkContentLength = false; _redirectDelay = 0; // TODO move this to ClientProperties _characterSet = HttpUnitUtils.DEFAULT_CHARACTER_SET; _contentType = DEFAULT_CONTENT_TYPE; _postIncludesCharset = false; _exceptionsThrownOnScriptError = true; _customAttributes = null; _javaScriptOptimizationLevel = -1; setScriptEngineClassName( DEFAULT_SCRIPT_ENGINE_FACTORY ); setScriptingEnabled( true ); }
private JavaNet(WebConversation wc) { super(null); this.wc = wc; // disable scripting support HttpUnitOptions.setScriptingEnabled(false); // java.net security certificate cause a problem. So avoid it by disabling certificate validation. SSLTrustAllManager.install(); // we need this to work around the broken cookies in java.net CookieProperties.setDomainMatchingStrict(false); // IssueZilla always have a DTD but for a restricted access project, it fails to resolve. // so just stop looking at DTD altogether. try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd",false); wc.setDocumentBuilderFactory(dbf); } catch (ParserConfigurationException e) { throw new Error(e); } }