Spring MVC – enable static resource access

1. The configuration

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

Mapping: represents all files under js directory
location: represents the specific file path of a static resource


2. If SpringMVC can’t find the static resource, then tomcat should find the static resource

<mvc:default-servlet-handler/>


Read More: