This depends on how you are doing it. I would recommend using a
CustomLayout for your purpose. CustomLayouts can be used as static HTML pages, but you can easily also attach some Vaadin components to the div:s.
Then create your own theme, use it, and add your html pages here:
VAADIN/themes/yourtheme/layouts/yourwebpage.html
There are also a few other ways. For instance adding the html to a Label, or inside an
Embedded .
Inside the WEB-INF/ folder, you should only put data that is meant to be invisible for the users. Adding your pages here will certainly not show up at your browser
If you can browse to the file with your browser, e.g http://localhost:8080/mypage.html, then you can use ExternalResource with that URL.
(you’ll have to set up your server so that you can server static files (so that the Vaadin servlet does not ‘eat’ those requests.)
You should also be able to place the file in your theme (under VAADIN/themes//) and use a ThemeResource().
You can also place your html ‘next to’ your class files, and use a ClassResource, which uses the classloader to load the file.
…there are more ways to do this, but let’s start with these
It’s probably cached in the browser. Why, and ow to fix this depends a little bit on how your server is set up, but it’s possible that ThemeResource is not your best choice if you plan to update the file regularly.
Some possibilities that spring to mind:
You could try serving the VAADIN directory statically/directly (as opposed to serving it via the Vaadin servlet). This is generally a good idea performance wise, and your server might be better at detecting changed files.
You could use something other than ThemeResource, for instance all ApplicationResources have a setCacheTime() method.
(- I’m not sure this works, but you could try to append a unique parameter to the name when the html changes; “mypage.html?123”)