Reputation: 3008
Tomcat 6 seems to be providing a default favicon for my webapp - the tomcat logo. I don't have a favicon.ico in my webapp root, nor does my web.xml mention anything about a favicon. I even have a mapping in my web.xml for *.ico that goes to the default servlet, but it is still showing. How can I remove that tomcat favicon?
I know I can specify a favicon in several ways to override this default icon. I'm trying to find out how (if possible) to prevent the default favicon that tomcat adds and thus have no favicon.
Upvotes: 18
Views: 47118
Reputation: 1
I was facing same issue and I have resolved it with following solution. I have added ?v=1.1.0 to the favicon line in head section of html. Whenever there is a change in favicon image I used to modify this parameter e.g. ?v=1.1.0 to ?v=1.1.1
Please see the sample code for more details.
<html>
<head>
<link rel="shortcut icon" href="favicon.ico?v=1.1.1" type="image/x-icon">
</head>
Upvotes: 0
Reputation: 2206
If favicon.ico
is changed in Catalina Home/webapps/ROOT
then all
web apps will show this image URL to root-apache-tomcat-x.x.xx/webapps/ROOT.
To change icon of each application specify following in head section:
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
Upvotes: 8
Reputation: 231
Delete or rename tomcat/webapps/ROOT/favicon.ico and Tomcat will look for a favicon.ico in the root of each web app that it serves. You don't need to put a into the head section of each page.
Upvotes: 14
Reputation: 444
To get no favicon shown, simply specify none. In most cases you must just remove the "favicon.ico" from your tomcat/webapps/ROOT. If simply removing favicon from tomcat/webapps/ROOT doesn't work for you, make sure that:
<link rel="shortcut icon" href="http://example.com/myicon.ico" />
is in your index-site or in your called site.In most cases, it's the browser cache... I hope this helps.
Upvotes: 7