修改tomcat部署的web项目浏览器图标显示

设置的方法主要有两种:

闲话少说,开门见山:

一、是最快捷简单的办法

 <head>
    <meta http-equiv="Content-Type" content="text/html; charset=GB2312">
    <link rel="shortcut icon" 
           href="http://www.weather.com.cn/favicon.ico" type="image/x-icon" />
    <title>JSP Page</title>
</head>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

如上面的操作: 
我们要做的操作就是将以下语句添加到上面的位置

<link rel="shortcut icon" 
             href="http://www.weather.com.cn/favicon.ico" type="image/x-icon" />
  • 1
  • 2
  • 3

效果如图

此方法的缺陷即为:每一个页面都得单独的加这么一个链接(很多页面的话很麻烦) 。

二、一劳永逸的处理方法

1.我们打开tomcat的安装目录

我本机的安装目录:

        C:\tomcat\webapps\ROOT\

我们只需找到这个目录然后将favicon.ico这个文件用自己的.ico图标替换。 
如图:

即可实现效果:

猜你喜欢

转载自blog.csdn.net/W_DongQiang/article/details/82147700
今日推荐