无法加载静态的图片Failed to load resource: the server responded with a status of 404 (Not Found)
想到的解决办法的思路是
1,是否是路径的错误
2,是否在resource中定义了静态资源加载(最好是在webapp下独立创建一个放静态资源的文件)
检查发现是路径的错误,可是为什么会出现路径的错误呢
发现是别人在提交项目的时候在js中绑定了项目名称,而我的项目不同导致的
解决问题:
在js中无法用到jsp的属性,那么如何将动态的项目名称放到js中呢
在引用的地方加
然后就可以直接在dtree.js中用root_path
原来是:
后面就可以改成:
这样就解决了
无法加载静态的图片Failed to load resource: the server responded with a status of 404 (Not Found)相关推荐
- Springboot 页面访问不到静态资源Failed to load resource: the server responded with a status of 404 ()
Springboot 页面访问不到静态资源 问题:在HTML文件中引入图片,但是浏览器访问不到图片. index.html: <!DOCTYPE html> <html xmlns: ...
- Failed to load resource: the server responded with a status of 404 ()
问题: Failed to load resource: the server responded with a status of 404 () 在SpringMVC中,你可能会遇到访问页面的时候 ...
- 浏览器控制台显示 Failed to load resource: the server responded with a status of 404 ()
今天做项目时,前端资源可以正常打开,但是使用SpringBoot启动时,前端控制台却显示浏览器控制台显示 Failed to load resource: the server responded w ...
- Failed to load resource: the server responded with a status of 404 (Not Found) iml文件配置错误
运行报错: Failed to load resource: the server responded with a status of 404 (Not Found) 原因: 发现是iml文件配置错 ...
- Failed to load resource: the server responded with a status of 404 (Not Found)啥意思
Failed to load resource: the server responded with a status of 404 (Not Found)这个错误表示,服务器无法找到您请求的资源.具 ...
- Failed to load resource: the server responded with a status of 404
搞来搞去附件下载请求的地址老包404,我用的easyui1.5 引用下载插件 <script type="text/javascript" src="${ctx ...
- Bug解决:Failed to load resource the server responded with a status of 404 ()
问题描述 在学习SpringMVC的时候,因为要学习ajax,然后导入了jquery,在浏览器控制台打印报错,初步断定是jquery导入失败问题 解决方法 一直在导入jquery上下功夫,半天发现不是 ...
- Failed to load resource:the server responded with a status of 404()
jsp页面: 原因: 声明文档的解析类型(document.compatMode),避免浏览器的怪异模式.document.compatMode: BackCompat:怪异模式,浏览器使用自己的怪异 ...
- Vue3报错之 Failed to load resource: the server responded with a status of 404 (Not Found)
不知道为什么,重新建立了src组件之后,之前组件运行npm run dev的localhost地址没办法打开新的组件,只能在新的组件里面重新右键在集成终端中打开运行npm run dev,反正问题是解 ...
最新文章
- steamvr unity 连接眼镜_150度FOV,自研显示方案,Kura公布全新AR眼镜Gallium
- 【怎样写代码】工厂三兄弟之抽象工厂模式(一):问题案例
- ICLR 2019最佳论文揭晓!NLP深度学习、神经网络压缩夺魁 | 技术头条
- 提高 ASP.NET Web 应用性能的 24 种方法和技巧
- jq 浏览器窗口大小发生变化时
- 一个小而美的博客——前端——index
- optee3.14 qemu_v8的环境搭建篇(ubuntu20.04)--镜像方式-直接使用
- JSON数据解析:Gson(谷歌)和fastjson(阿里巴巴)的异同点
- AOP 代理(AOP Proxy)
- Mybatis中mapper文件中的两层循环
- OpenCV辅助对象(help objects)(5)_DataType
- 马云卸任浙江阿里小额贷款股份有限公司法定代表人、董事长
- SQL SERVER 锁定的实例
- Maven 打包错误:%JAVA_HOME%/../lib/tools.jar
- 如何建立强有力的人脉关系?
- 自己动手 DIY 一个读写200MB/s 的高速 U 盘
- CSS 盒子模型 第三节
- 论文阅读-OneRel: Joint Entity and Relation Extraction with One Module in One Step- CCF A- AAAI 2022
- 一次性能优化引发的思考
- 华硕 PRIME Z490-PLUS+i7-10700K黑苹果EFI引导文件