Skip to content

Instantly share code, notes, and snippets.

@alexanderbartels
Created September 24, 2015 16:06
Show Gist options
  • Save alexanderbartels/831ae012245cbf633bc6 to your computer and use it in GitHub Desktop.
Save alexanderbartels/831ae012245cbf633bc6 to your computer and use it in GitHub Desktop.
web.xml to with mime type for web fonts
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Web-Fonts</display-name>
<!-- web fonts -->
<mime-mapping>
<extension>eot</extension>
<mime-type>application/vnd.ms-fontobject</mime-type>
</mime-mapping>
<mime-mapping>
<extension>otf</extension>
<mime-type>application/x-font-opentype</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ttf</extension>
<mime-type>application/x-font-ttf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>woff</extension>
<mime-type>application/x-font-woff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>svg</extension>
<mime-type>image/svg+xml</mime-type>
</mime-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
@MarcSimon007
Copy link

Marten, sorry no change to do. All this mime-mapping rules exist at the web.xml file, except .woff2. No change from result?
With more deep investigate, I can see following error:

Status code 404 ==> access problems to resolve between tomcat and IIS. Is there a solution to use a IIS Tomcat connector?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment