Spring comes with a Resources Servlet.
<!-- Serves static resource content from .jar files such as blartoch.jar -->
<servlet>
<servlet-name>Resources Servlet</servlet-name>
<servlet-class>org.springframework.js.resource.ResourceServlet</servlet-class>
<load-on-startup>50</load-on-startup>
</servlet>
<!-- Map all /resources requests to the Resource Servlet for handling -->
<servlet-mapping>
<servlet-name>Resources Servlet</servlet-name>
<url-pattern>/resources/*</url-pattern>
</servlet-mapping>
We are using an ear file and all of my resources are in a jar in the ear. If you are only deploying a WAR file (perhaps to tomcat), then try putting your resources in a jar and putting the jar in your WAR file's /WEB-INF/lib directory.
If you store your resources (inside the jar) in the following directory:
/META-INF/common/images
requests for your resources will look something like this:
<img src="<c:url value="/resources/common/images/cuteKitten.jpg"/>"/>