javafx的webview嵌套网页的时候可能会遇到一些需要允许跨域访问(禁止同源策略)的页面

那么我们在初始化的代码前加上以下代码即可

System.setProperty("sun.net.http.allowRestrictedHeaders","true");

 

 

 转载请注明博客出处:http://www.cnblogs.com/cjh-notes/

 

相关文章:

  • 2022-01-23
  • 2022-12-23
  • 2021-08-24
  • 2021-05-15
  • 2022-03-05
  • 2021-10-09
  • 2021-12-26
猜你喜欢
  • 2021-09-13
  • 2022-12-23
  • 2021-08-25
  • 2022-12-23
  • 2022-02-08
  • 2021-06-21
  • 2021-11-17
相关资源
相似解决方案