Vaadin:如何更改网站图标? [英] Vaadin : How to change favicon?

查看:35
本文介绍了Vaadin:如何更改网站图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 Vaadin 中更改页面的收藏夹图标?我想更改我的页面的图标,但我不知道在哪里更改它?有人有这方面的经验吗?

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 ?

推荐答案

首先创建主题目录:/WebContent/VAADIN/themes/mynewtheme

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

然后,将您的自定义 favicon.ico 放在此目录中.您还需要在应用程序中设置主题属性:

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");
    }
}

这篇关于Vaadin:如何更改网站图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆