0

I am using JavaFX WebView in my application. Some sites are opening perfectly, but some sites are not. We have our internal web application which is working in all the browsers like chrome, firefox. While opening through WebView it's launching the login page, but when I click login our application itself throwing error like Some thing went wrong, which is working fine on all other browsers. Some SAP urls are also not working.

After searching through stackoverflow found some solutions, tried with below solutions but problem is not solved:

System.setProperty("jsse.enableSNIExtension", "false");
System.setProperty("-Djdk.tls.client.protocols", "TLSv1");
System.setProperty("javax.net.ssl.trustStore", "path to truststore");

Added below code to see the errors:

webEngine.getLoadWorker().stateProperty().addListener(new ChangeListener<State>() {
    @Override
    public void changed(ObservableValue<? extends State> ov, State oldState, State newState) {
        System.out.println(webView.getEngine().getLoadWorker().exceptionProperty());
    }
}

What is JavaFX WebView browser funtionality? Is it support for all kind of sites?

dzikoysk
  • 1,560
  • 1
  • 15
  • 27
user3355101
  • 231
  • 6
  • 15

1 Answers1

0

Try trusting all SSL certificates before loading a URL. Some untrusted certificates can create problem for JavaFX WebEngine. This StackOverflow post might solve your problem: https://stackoverflow.com/a/23782959/5250273

Community
  • 1
  • 1
Ugurcan Yildirim
  • 5,973
  • 3
  • 42
  • 73