How can i set my custom index.html page ?

Hi,

I’ve searched around the forum but did not find a clear answer to this question :

In fact I would like to call my own javascript library in all my vaadin applications.
I saw that it was possible to define my own index.html page, so I thought,
“Ok, I create this page (copying the automatically generated one) and just adding the script tag I needed.”

I put this new index.html page in the webContent folder, but It doesn’t seem to be called…

Where should I put this page, or is there something else to change in the web.xml file ?

Thanks for your answer… and thanks for your product !

index page in Vaadin is kind a virtual. When you point your browser, the Vaadin’s ApplicationServlet generates a starting html code to boot up the application. So you have to override the ApplicationServlet and tweak boot html page generation code to add your JS libraries.

Hi,

How can I override the ApplicationServlet and tweak boot html page generation code to add the JS libraries in Vaadin 10? It’s possible do it in Vaadin 10?

Thank you!

There is documentation about integrating custom JS in Vaadin:

https://vaadin.com/docs/flow/importing-dependencies/tutorial-importing.html

There is also documentation about modifying the boot html page:

https://vaadin.com/docs/v14/flow/advanced/tutorial-bootstrap.html

Regards