SoFunction
Updated on 2025-03-08

How to modify the tomcat project icon (two types)

When we view web pages, many websites have their own small icons. When the system reads this logo, first read from the root directory of your project to see if there is any file. If there is a direct display of this icon, if there is no, you will go to webapps/root/ to find this file. If there is no two places, the IE icon will be displayed.

One form is to modify the page

<link rel="shortcut icon" href="" rel="external nofollow" type="image/x-icon" />

The value of href is the path of the address bar icon. Of course, this can be relative or absolute. The current value means that the icon file is in the root directory of the project, and it can also be changed to the following.

In this way, it can be achieved if you want the address bar icon displayed on each page to be different.

2. Modify webapps/root icons

Find the installed tomcat directory
Open the tomcat directory and enter
D:\tomcat\apache-tomcat7\webapps\ROOT
Find the icon
Overwrite your own small icon tomcat default icon
Restart your server
Visit your own website and you can see the small icons you set

Summarize

The above is the editor’s introduction to how to modify the tomcat project icon. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to everyone in time. Thank you very much for your support for my website!