tags:

views:

1555

answers:

2

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

+1  A: 

This might be different in different application servers. For tomcat, the favicon comes from the directory your root context is mapped to. So if your application is mapped to the root context [/], just place the favicon.ico file in the top level folder in your war file.

neesh
+7  A: 

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.

stian