码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2017-12-09 18:13:37      阅读:207      评论:0      收藏:0      [点我收藏+]

标签:java   javascrip   SSM框架   div   serve   错误   span   source   rip   

这个错误提示的是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>

这里检查静态文件的引用目录,如果这里设置的目录不是你在项目中实际的文件位置那么就会报 Failed to load resource: the server responded with a status of 404 (Not Found)这个错误。

 

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

标签:java   javascrip   SSM框架   div   serve   错误   span   source   rip   

原文地址:http://www.cnblogs.com/black-knight/p/8011980.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!