简体   繁体   中英

Vaadin BrowserFrame not working

I am simply trying to load Google web page using Vaadin's BrowserFrame component and it's not working.

I can load https://vaadin.com but not https://www.google.com . I have tried both BrowserFrame and Embedded APIs but no luck.It displays a blank white page.

Embedded e = new Embedded("Vaadin web site", new ExternalResource(
                "https://www.google.com"));
        e.setType(Embedded.TYPE_BROWSER);
        e.setWidth("100%");
        e.setHeight("100%");
        panel.setContent(e);

and

ExternalResource source = new ExternalResource("https://www.yahoo.com");
            contentBrowser = new BrowserFrame(caption, source);
            contentBrowser.setSizeFull();
            panel.setContent(contentBrowser);

If i use https://vaadin.com site loads fine.

Some sites send the X-Frame-Options: SAMEORIGIN header to prevent their content to be displayed in sites from a different domain. That's the case of google.com.

For me the problem is even worse
BrowserFrame randomly loads, sometimes (i get some messeage of we can't find the site).
We know this URL works, if i access it directly.
I just wanted my web app to open a Panel with a BrowserFrame and the help in there.
I might need to revert to opening a whole new browser page with the help URL.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM