0 votes
in JavaScript by
Failed to load resource: the server responded with a status of 404 (not found)

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>

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://local

1 Answer

0 votes
by
To Overcome to the above problem one needs to do the below

Your files are not under the jsp folder that's why it is not found. You have to go back again 1 folder Try this:

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

Now examine one of your links:

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

The "../" is shorthand for "The containing directory", or "Up one directory". This is a relative URL. At a guess, you have a file in /jsp/<somefolder>/ which contains the <link /> and <style /> elements.

I recommend using an absolute URL:

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

The reason for using an absolute url is that I'm guessing the links are contained in some common file. If you attempt to correct your relative pathing by adding a second "../", you may break any files contained in /jsp.

Related questions

0 votes
asked Oct 8, 2022 in JavaScript by rajeshsharma
0 votes
asked Dec 2, 2020 in HTML by Sandeepthukran
...