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?
How to change the logo displayed in the title bar of browser for a web application deployed in tomcat?
Asked Answered
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>
is there anyway to do this programatically? so that by default the icon is displayed –
Fishing
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 env –
Fishing
@Balf What can I do this in JBoss? –
Sedberry
Uhm @Balf I found it in $JBOSS_HOME/welcome-content folder. Thanks anyway –
Sedberry
If I want to do progrrmatically then I have to write this code in every page ? –
Contented
© 2022 - 2024 — McMap. All rights reserved.