How to change the logo displayed in the title bar of browser for a web application deployed in tomcat?
Asked Answered
F

1

7

I have a web application deployed in tomcat. When I open the application in a browser, the image before the URL in the address bar and the image before the title of the application on the tab both show the tomcat image. I want to change this and put in my own logo in both the places. How can I do that?

Fishing answered 11/11, 2011 at 9:32 Comment(0)
B
11

This image is called the favicon.ico and is found in your tomcat installation under

$tomcat-home\webapps\ROOT

Just replace it with your own icon image saved as favicon.ico

In code try

<head>
<link rel="shortcut icon" href="http://www.yoursite.com/favicon.ico"> 
</head>
Balf answered 11/11, 2011 at 10:13 Comment(6)
is there anyway to do this programatically? so that by default the icon is displayedFishing
why would you want to do this programatically? If you change the image on disk, it can get cached by browsers and wont be evaluating at runtime (as done programatically)Balf
I dont want to replace the icon manually in tomcat as we can not ask users to do that in a real time envFishing
@Balf What can I do this in JBoss?Sedberry
Uhm @Balf I found it in $JBOSS_HOME/welcome-content folder. Thanks anywaySedberry
If I want to do progrrmatically then I have to write this code in every page ?Contented

© 2022 - 2024 — McMap. All rights reserved.