Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
685 views
in Technique[技术] by (71.8m points)

javascript - 无法加载资源:服务器响应状态为404(未找到)(Failed to load resource: the server responded with a status of 404 (Not Found))

I can't solve my link problem.

(我无法解决我的链接问题。)

Could you help on to this to link CSS and JS File?

(你能帮忙解决这个问题,将CSS和JS文件联系起来吗?)

CSS:

(CSS:)

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

JS:

(JS:)

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

Error:

(错误:)

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

Refer this link Directory structure.

(请参阅此链接目录结构。)

在此输入图像描述

  ask by user3331535 translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Your files are not under the jsp folder that's why it is not found.

(您的文件不在jsp文件夹下 ,这就是找不到它的原因。)

You have to go back again 1 folder Try this:

(你必须再回去1个文件夹试试这个:)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...