How to Fix Failed to load resource: the server responded with a status of 404()

Problem: Failed to Load Resource: The server required you with a status of 404 () In SpringMVC, you might encounter a page access 27) and discover that all static resources are 27) blocked because all static resources are 27) blocked by default (JS, CSS). HTML, image, video, audio) for static resources, you need to manually configure the static resource filter.
Solution:
The first:
web.xml

<servlet-mapping>
		<servlet-name>default</servlet-name>
		<url-pattern>*.jpg</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>default</servlet-name>
		<url-pattern>*.js</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>default</servlet-name>
		<url-pattern>*.css</url-pattern>
</servlet-mapping>

The second:
spingmvc.xml

<!-- Accessing Static Resource Configuration -->
    <mvc:resources location="/static/" mapping="/static/**" />

Read More: