How to embed HTML files in Vaadin

Hi All,

I am currrently using vaading framework in netbeans, I am currently following this link
https://vaadin.com/docs/-/part/framework/application/application-resources.html
Under the
Filer Resources
heading it is mentioned[b]

[/b]about loading an image, But how to load an HTML file instead of an image? Also I dont want the link element to display, I want to load the page on running the application. Please suggest me with a solution.

Check the Embedded Resources part in the docs: https://vaadin.com/docs/-/part/framework/components/components-embedded.html

-Olli

Thanks for replying back Olli,

The above url contails to load a image file, how to load a html file from a folder. Please share any sources. It will be really helpful

This seems to work:

ThemeResource tr = new ThemeResource("hello.html"); BrowserFrame embedded = new BrowserFrame("html", tr); There’s a hello.html in the theme folder that gets shown like this. You can also use other types of resources, of course.

-Olli

If you want to get rid of the link elements, you could preprocess the page - load the file, do a transformation and create a StreamResource out of it.

-Olli