SSM框架下 Failed to load resource: the server responded with a status of 404 (Not Found)错误

这个错误提示的是js的引用路径有错:

1.检查应用路径是否正确(我的问题是路径是正确的但是去到页面就会提示404错误)

引用路径,最好都使用绝对路径

<script type="text/javascript" src="<%=basePath%>/js/jquery-1.12.4.js"></script> 

2.在SSM框架下面查看配置文件

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

猜你喜欢

转载自www.cnblogs.com/sjzxs/p/10275431.html