resource



<mvc:annotation-driven />
<mvc:resources mapping="/resources/**" location="/resources/" />
fix from security filters: 
<intercept-url pattern="/css/**" filters="none"/>
<intercept-url pattern="/js/**" filters="none"/>
<intercept-url pattern="/img/**" filters="none"/>


Setting last-modify tag
ShallowEtagHeaderFilter

cache:
<mvc:interceptors>
        <bean class="org.springframework.web.servlet.mvc.WebContentInterceptor" >
            <property name="cacheSeconds" value="0"/>
            <property name="alwaysUseFullPath" value="true"/>
            <property name="cacheMappings">
                <props>
                    <!-- cache for one day -->
                    <prop key="/css/**">86400</prop>
                    <prop key="/font/**">86400</prop>
                    <prop key="/img/**">86400</prop>
                    <prop key="/js/**">86400</prop>
                    <prop key="/proposalroot/**">86400</prop>
                    <prop key="/res/**">86400</prop>
                    <prop key="/_include/**">86400</prop>
                    <!-- don't set cache headers -->
                    <prop key="/cache/agnostic/**">-1</prop>
                </props>
            </property>
        </bean>
    </mvc:interceptors>

Or even so: 

<mvc:resources mapping="/resources/**"
               location="/, classpath:/WEB-INF/public-resources/"
               cache-period="10000" />
The second loaction (classpath:/WEB-INF/public-resources/) in mvc:resources (looks like you used some roo based template) can be to expose ressources (for example js-files) form jars, if they are located in the directory WEB-INF/public-resources in the jar)






Comments