How the Java Web Project modifies the Favicon.ico icon

Source: Internet
Author: User

1. Modify the Tomcat icon for the entire project

Locate the Tomcat root directory (tomcat-webapps-root directory), then overwrite the modified Favicon.ico icon with the local icon, then restart the project, refresh, clear the browser cache, and then access the view icon to see if it has changed.

Do not change the other, sometimes after the launch, the browser has not changed, try a few more times, and then change the browser to try. I have tried several times and then changed the browser to appear the result;

The result of the appearance of this way: as long as the project is started, the access to the page icon will change ;

2. Modify the Tomcat icon for some pages

Add the following code to the page where you want to modify the icon in the project's directory, and then specify the change icon, to start the project to access the specified page to see if the icon has changed:

Place the modified icon in a specified file (relative paths are written)

  

Different icons appear when you visit different pages:

1) Access the Edit Icon page

  

2) Access the Edit Icon page

  

How the Java Web Project modifies the Favicon.ico icon

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.