I'm using Spring MVC 3.0 where I specify the following mvc:resources
tag to allow the static resources through:-
<mvc:resources location="/resources/" mapping="/resources/**" />
Somehow, I'm having problem getting my audio files to work. I decided to place an image file in the same location just to test the path and that works fine.
http://server/context/resources/test/image.jpg -> works fine
http://server/context/resources/test/audio.mp3 -> I get 404 error
I read the Spring MVC documentation and it doesn't actually describe what's considered as static resources, and I would think the mp3 file is a static resource.
How do I get my audio file to work with Spring MVC 3.0? Thanks.
EDIT
My servlet.xml looks like this:-
<context:component-scan base-package="some.project.controller" />
<mvc:annotation-driven />
<mvc:resources location="/resources/" mapping="/resources/**" />
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/app/" />
<property name="suffix" value=".jsp" />
</bean>