favicon.ico in Java WAR file

djsnowsill picture djsnowsill · Dec 30, 2008 · Viewed 18.9k times · Source

Can anybody provide some instruction on how to setup a war file to show a favicon.ico in the browser address bar?

Answer

stian picture stian · Dec 30, 2008

You can also use the following HTML markup in your HTML:

<link rel="icon" type="image/gif" href="/img/image.gif">

Most newer browsers should support it and I think it's generally a more clean way since you can use any image type/name/location you want.