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
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:
- Vue Browser Error: Failed to load resource: the server responded with a status of 404 (Not Found)
- How to Fix Word Opening Error: the resource dll cannot be loaded
- How to Fix Microsoft SQL Server Error 1326
- [Solved] ssh secure shell: server responded algorithm negotiation failed
- How to Fix Webpack run error webpack dev server
- [Solved] Failed to load response data: no data found for resource with given identifier
- WordPress update failed 429 too many requests (How to Fix)
- [Solved] Triton-inference-server Start Error: Internal – failed to load all models
- How to Solve Error: failed to load response
- How to Solve Error: Failed to load ApplicationContext
- Axios request failed, get the status code and error information, how to encapsulate the function dealing with the public error code
- How to Fix Error 1069:The service did not start due to a logon failure
- How to Fix msgsend() error: to many arguments to function call, expected 0, have2
- How to Solve Error: could not read ok from ADB Server.failed to start daemon error: cannot connect to daemon
- How to Solve Error: Resource’/Servers’ does not exist
- Start failure: spawn CMD enoent error (How to Fix)
- How to Fix the common Warning Errors after Vue Project Startup
- How to Fix NSS error 12190 in curl accessing to HTTPS
- How to Fix TNS 12560 Error
- How to Solve Error: java.io.IOException: Resource [classpath:shiro.ini] could not be found.