File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Embedding icon image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Embedding icon image" Watch "Embedding icon image" New topic

Embedding icon image

Velika Srbija
Ranch Hand

Joined: Jan 15, 2002
Posts: 172
What way I could embed custom icon image in an "Address field" of IE when sending regular .jsp file?
Nico Krijnen

Joined: Oct 22, 2002
Posts: 2
Just put a windows .ico file with the name 'favicon.ico' in the root of your server. You can create .ico files with third party software (for instance Microangelo), see
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63534

Firstly, be sure that your icon file follows all the "rules" of being a true Windows icon file. Then place it somewhere accessible on your server.
It doesn't matter what you name it.
Secondly, add the following tag to the <head> section of your html or JSP page:

For example, if bear.ico were in the same folder as the html file:

Note that this is not part of the W3C standard so browser support is spotty. IE6 only appears to show the icon when the page is saved as a bookmark. Mozilla shows the icon right away, but not in the bookmark.
I'm also assuming that this is Windows-only since the .ico format is a Windows format, but I'm not at my Mac to test it out at the moment.
P.S. This should probably be moved to the HTML forum since it's not really JSP-related.
[ October 22, 2002: Message edited by: Bear Bibeault ]

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Embedding icon image
It's not a secret anymore!