File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Glassfish and the fly likes How to change glassfish application server default browser icon? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Glassfish
Bookmark "How to change glassfish application server default browser icon?" Watch "How to change glassfish application server default browser icon?" New topic
Author

How to change glassfish application server default browser icon?

Haytham Douaihy
Greenhorn

Joined: May 10, 2012
Posts: 14

Can we set a default browser-tab icon for applications running under glassfish server?
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

Add a favicon.ico file, containing the image you want shown, to the root context of your application. This should work in any standardized web application container.


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Haytham Douaihy
Greenhorn

Joined: May 10, 2012
Posts: 14

unfortunately with glassfish, this solution do not work!
the only solution till now is to embed it inside the html code using the link tag referencing the favicon.ico to be used...
thanks anyways
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

I bet if you look in your logs you'll see the file is being accessed if it's in the right place.

Possibly your GlassFish installation does not define the proper MIME type for a .ico file Try adding:

<mime-mapping>
<extension>ico</extension>
<mime-type>image/vnd.microsoft.icon</mime-type>
</mime-mapping>

to your default-web.xml file and see if that helps.
Haytham Douaihy
Greenhorn

Joined: May 10, 2012
Posts: 14

Inside the default-web.xml, there is already a mime definition for 'ico', which is

so i left it, and i added the type that you provided. then i put the favicon.ico under the context-root of my application, then restarted the server, but no change also... maybe am missing something else?

about the log file, at which log file should i look? i tried the default server.log but nothing inside referencing a missing ico image...
Haytham Douaihy
Greenhorn

Joined: May 10, 2012
Posts: 14

Michael,
I was using Firefox for testing, and i don't know if there is a special configuration or issue with favicon on Firefox, but what i know, that after testing your suggestion using google chrome, i find it well working...
thanks!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to change glassfish application server default browser icon?