Kulwant
Kulwant

Reputation: 681

mvc:resources not picking up everything under resource folder

This thing works for 4 of the 5 folders under _res.

<mvc:resources mapping="/_res/**" location="/_res/"/>

It is not picking anything up under the fonts folder which is referenced from the style sheets like this

src:    url('../fonts/proximanova-bold-webfont.eot');

Everything under the _res folder is being reflected in the application.

_res
css
fonts
i
js
video 

Upvotes: 2

Views: 1167

Answers (1)

Max Stewart
Max Stewart

Reputation: 3583

I realise this answer is a few months late, but I've just had the same issue so thought I should add an answer for anyone else who comes across it.

The Spring Resources Servlet won't serve content it doesn't have a mime-type for, so in your case for .eot files you need to add

<mime-mapping>
    <extension>eot</extension>
    <mime-type>application/vnd.ms-fontobject</mime-type>
</mime-mapping>

to your web.xml file.

Upvotes: 4

Related Questions