0

This very simple code:

    final WebView browser = new WebView();
    final WebEngine engine = browser.getEngine();
    engine.getLoadWorker().stateProperty().addListener(new ChangeListener<Worker.State>() {
        @Override
        public void changed(ObservableValue ov, Worker.State oldState, Worker.State newState) {
            if (engine.getLoadWorker().getException() != null && newState == State.FAILED) {
                LogUtil.getLog().error("Fallo al cargar la página", engine.getLoadWorker().getException());
            }
        }
    });
    final String url = webBean.getURL();
    engine.load(url);

when loading an URL using https succeeds in JDK1.7.0_80 in a MacOSX, but fails in Windows using the same JDK version. The exception is a 'connection timeout'. The only difference I can see is that the Windows environment uses a proxy, but the same https URL in the same Windows environment and using the same proxy but with an external browser loads without problems too. I'm really stucked with this problem.

  • Perhaps you would like to read up on [Java Networking and Proxies](https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html). I'm not really an expert in this and cannot advise further. – jewelsea Mar 10 '16 at 22:37
  • Perhaps this is a duplicate of: [Set proxy on JavaFX WebEngine?](http://stackoverflow.com/questions/24691472/set-proxy-on-javafx-webengine) – jewelsea Mar 10 '16 at 22:42
  • RESOLVED! We have to set the proxyHost and proxyPort properties for both the http and the https protocols separately. Thanks @jewelsea for the link. – Richard de Olba Mar 11 '16 at 07:00

0 Answers0