Page icon


I would like to change the icon of my web browser in my Vaadin application class. I heard about a favicon.ico but I don’t understand how to apply this method. Could anyone help me ?


I’m not 100% sure of this, but I think you can just put a picture file named favicon.ico to the root of your theme folder, and it will be displayed automatically. There is a default image included with the reindeer theme if you need an example.

I put a favicon.ico file into my theme folder but nothing happens !
I am sure it is the right folder beacause there is my CSS stylesheet inside.



Do not forget call a method setTheme(“youtheme”) in main window

I have a method setTheme(“heliostheme”) in my init(). I made up a .ico file, rename it in favicon.ico and put it in WebContent/VAADIN/themes/heliostheme/favicon.ico but it doesn’t work.

Check the source code of your application page, it should say something like this near the top (taken from sampler):

<link rel="shortcut icon" type="image/" href="/VAADIN/themes/sampler-reindeer/favicon.ico" />
<link rel="icon" type="image/" href="/VAADIN/themes/sampler-reindeer/favicon.ico" />

If this is present, then there might be something wrong with the image file. If it is not, there is probably something wrong with the code&configuration.

Actually, it works well. I just had to restart my application server. Thank you everyone :wink: