iframe equivalent

I need to include a different webservices HTML into a Vaadin Tab (of a tabsheet).
Is there Vaadin component or a general HTML component that can help with that?

I found this code:

    Resource source = new ExternalResource("http://localhost:9990/");
    BrowserFrame frame = new BrowserFrame("Title", source);

Now my current problem is that I get these errors from browser:

Refused to display ‘http://localhost:9990/’ in a frame because it set ‘X-Frame-Options’ to ‘deny’.
com.vaadin.DefaultWidgetSet-0.js:2245 GET http://localhost:9990/ net::ERR_BLOCKED_BY_RESPONSE

How do I set the X-Frame-Options Header in Vaadin, preferably for multiple hosts?

I’m trying to use the following code, but it doesn’t seem to affect the headers:

    protected void init(VaadinRequest request)
    VaadinResponse response = VaadinService.getCurrentResponse();
    response.setHeader("X-Frame-Options", "ALLOW-FROM http://localhost:9097/");

Any ideas?

This works:


in “public class WebSecurityConfigurer extends WebSecurityConfigurerAdapter”

Now my current problem is that I get locked out of the main window Vaadin session, probably because the JSESSIONID conflicts with the vaadin window in the iframe.

How can I set the name of the Session ID?

I found that session id can be set in application.yml like this:

port: 9990

My new problem is that I now have a tabsheet with tabs that contain a browserframe.
The problem is that when i switch the active tab to a different tab and back to the original tab, the original tab loses all data that has been entered, because the iframe is reloaded.