资源加载失败:服务器响应状态为404(未找到)

108

我无法解决我的链接问题。你能帮我解决如何链接CSS和JS文件吗?

CSS:

<link  href="../Jquery/jquery.multiselect.css" rel="stylesheet"/>
<link  href="../Jquery/style.css" rel="stylesheet" />
<link  href="../Jquery/prettify.css" rel="stylesheet" />

JS:

<script  src="../Jquery/jquery.multiselect.js"></script>
<script  src="../Jquery/prettify.js"></script>

错误:

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/Jquery/jquery.multiselect.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/Jquery/style.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/Jquery/prettify.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/Jquery/jquery.multiselect.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/Jquery/prettify.js

请参考这个链接目录结构。

在此输入图片描述


现在它已经按照他的回答正常工作了 @Geddemet - user3331535
请通过投票箭头旁边的绿色复选框接受他的答案。 - Nicholas Hazel
我建议您在这里检查此问题:http://magento.stackexchange.com/questions/96032/magento-2-installation-issue-404-error-while-trying-to-load-admin-page - Mohammad nasim
13个回答

0
请安装Ionic 3解决方案的App Script。
npm i -D -E @ionic/app-scripts

0

对我来说,错误是 js 文件夹下的文件未包含在项目中,这解决了我的问题:

1- 在解决方案资源管理器工具栏中单击“显示所有文件”。

2- 打开 js 文件夹并选择文件夹下的所有文件

3- 右键单击,然后选择“包含在项目中”

4- 保存并构建您的应用程序,然后它将正确工作并加载 .css 和 .js 文件


0
// To fix this issue, please add the below changes to src/index.html
For example : ( add project name or project root path ) 
<base href="/enter_project_folder_name/">

1
你的答案可以通过提供附加支持信息来改进。请编辑以添加进一步的细节,例如引用或文档,以便他人可以确认您的答案是否正确。您可以在帮助中心找到有关如何撰写良好答案的更多信息。 - moken

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接