MIME Type

Problem

The browser does not show the Favicon of the web application, even it is stored in the root directory and the associate head tag is defined in the page.

Cause

The GlassFish MIME type list does not contain an entry for the file extension ico. Therefore the server sends the Favicon file with MIME type text/html back to the browser.

Solution

To solve this problem for all web applications just add the MIME type image/vnd.microsoft.icon in the file default-web.xml [2].

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

Resources

Johannes Hammoud MIME Type 29.08.2009

I Coding : Community about Java programing

Language German+-

Java JSF JavaScript HTML CSS NetBeans GlassFish MySQL

Imprint

Visits
6279879
Today
7201