Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vaadin : How to change favicon?

Tags:

vaadin

vaadin7

How can I change favicon of my pages in Vaadin ? I would like to change favicon of my pages but I have no idea where is the place to change it ? Has somebody experience on it ?

like image 733
Cataclysm Avatar asked Sep 04 '14 08:09

Cataclysm


People also ask

How do I change the default favicon for my website?

Right-click favicon.ico and select Change Resource. In Change Resource, select an ICO image with the new favicon. Check if some elements in the module use the old icon and update them if needed. Press Ctrl+F or click the search icon, enter favicon.png and select Search in this Module.

What is a favicon?

Overview A favicon is a small website icon displayed in a browser, usually next to an address. Often we don't want to settle for the default ones provided by various frameworks such a Spring Boot.

How to override the default favicon of a Spring Boot application?

The simplest way to override the default favicon of a Spring Boot application is to place the new favicon in the resources directory: The favicon file should have the “ favicon.ico” name. We may also put that file in the static directory inside the project's resources directory:

How do I change the favicon of an ico image?

In Change Resource, select an ICO image with the new favicon. Check if some elements in the module use the old icon and update them if needed. Press Ctrl+F or click the search icon, enter favicon.png and select Search in this Module.


1 Answers

First, create a theme directory: /WebContent/VAADIN/themes/mynewtheme

Then, put your custom favicon.ico in this directory. You also need to set theme property in your application :

public class MyNewApplication extends Application {

    @Override
    public void init() {
        ...
        ...
        setTheme("mynewtheme");
    }
}
like image 144
Greg Ballot Avatar answered Oct 23 '22 23:10

Greg Ballot