java - Jetty 9 FontAwesome Empty Icons -
i hosting java webapp jetty 9, , i'd host fontawesome icons myself. don't see icons (they're square. if link cdn, works fine
this link works
<%--<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">--%>
this doesn't
<link rel="stylesheet" type="text/css" href="../resources/font-awesome-4.3.0/css/font-awesome.min.css"/>
i've tried adding following web.xml
<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-truetype</mime-type> </mime-mapping> <mime-mapping> <extension>woff</extension> <mime-type>application/font-woff</mime-type> </mime-mapping> <mime-mapping> <extension>woff2</extension> <mime-type>application/octet-stream</mime-type> </mime-mapping> <mime-mapping> <extension>eot</extension> <mime-type>application/vnd.ms-fontobject</mime-type> </mime-mapping> <mime-mapping> <extension>svg</extension> <mime-type>image/svg+xml</mime-type> </mime-mapping>
all ie following
css3111: @font-face encountered unknown error. file: opensans-light.ttf
and chrome
failed decode downloaded font: localhost:8080/resources/theme-triton/resources/fonts/opensans-light.ttf index.jsp:1 failed decode downloaded font: localhost:8080/resources/theme-triton/resources/font-awesome/fonts/fontawesome-webfont.woff2?v=4.3.0 index.jsp:1 failed decode downloaded font: localhost:8080/resources/theme-triton/resources/fonts/opensans-regular.ttf index.jsp:1 failed decode downloaded font: localhost:8080/resources/theme-triton/resources/fonts/opensans-bold.ttf index.jsp:1 failed decode downloaded font: localhost:8080/resources/theme-triton/resources/font-awesome/fonts/fontawesome-webfont.woff?v=4.3.0 index.jsp:1 failed decode downloaded font: localhost:8080/resources/theme-triton/resources/font-awesome/fonts/fontawesome-webfont.ttf?v=4.3.0 index.jsp:1 failed decode downloaded font: localhost:8080/resources/font-awesome-4.3.0/fonts/fontawesome-webfont.woff2?v=4.3.0 index.jsp:1 failed decode downloaded font: localhost:8080/resources/font-awesome-4.3.0/fonts/fontawesome-webfont.woff?v=4.3.0 index.jsp:1 failed decode downloaded font: localhost:8080/resources/font-awesome-4.3.0/fonts/fontawesome-webfont.ttf?v=4.3.0
response header
http/1.1 200 ok content-type: application/x-font-truetype last-modified: sun, 31 may 2015 17:30:12 gmt accept-ranges: bytes content-length: 359350 server: jetty(9.2.10.v20150310)
request header
accept:*/* accept-encoding:gzip, deflate, sdch accept-language:en-gb,en-us;q=0.8,en;q=0.6 cache-control:no-cache connection:keep-alive host:localhost:8080 pragma:no-cache referer:localhost:8080/wro/test.css user-agent:mozilla/5.0 (windows nt 6.1; win64; x64) applewebkit/537.36 (khtml, gecko) chrome/45.0.2418.0 safari/537.36
can tell me what/where doing wrong?
i didn't specify using maven build project. have specify file extensions maven should not filter, if not maven corrupt file. similar answer https://stackoverflow.com/a/31475762/4959062
<plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-resources-plugin</artifactid> <version>2.7</version> <configuration> <nonfilteredfileextensions> <nonfilteredfileextension>woff</nonfilteredfileextension> <nonfilteredfileextension>ttf</nonfilteredfileextension> <nonfilteredfileextension>woff2</nonfilteredfileextension> <nonfilteredfileextension>eot</nonfilteredfileextension> <nonfilteredfileextension>swf</nonfilteredfileextension> <nonfilteredfileextension>ico</nonfilteredfileextension> </nonfilteredfileextensions> </configuration> </plugin>
Comments
Post a Comment