• Register
0 votes
252 views

Problem :

I am unable to solve my link problem. Can anybody help on to this to link the CSS and JS File?

I am facing below 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

 

6 5 3
7,540 points

1 Answer

0 votes

Solution :

Please note your failing URL:

Failed ... http://localhost:8080/RetailSmart/jsp/Jquery/jquery.multiselect.css

Now you need to examine one of your links:

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

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

So I recommend you to use an absolute URL as below:

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

The reason behind using the absolute url is that I'm guessing that your links are contained in some of the common file and if you try to correct your relative paths by adding the second "../", then you may break any files contained in the /jsp.

9 7 4
38,600 points

Related questions

0 votes
1 answer 37 views
37 views
Problem : I want to send a call using ajax but in Chrome getting following error Failed to load resource: the server responded with a status of 500 (internal server error) But for firefox getting no error. I also tried to record the ajax call in firebug but there is no call request in ... function (msg) { }, error: function (xhr, status, error) { alert(error.responseTextss); } }); }); }); }); }
asked Nov 22, 2019 peterlaw 6.9k points
0 votes
1 answer 897 views
897 views
Problem : I am facing the below error: Failed to load resource: the server responded with a status of 401 (Unauthorized) http://localhost/App/AngularJS/angular.min.js My project works fine on the localhost. But when I try to run it on the IIS (7.5) I often face ... read/write/modify access for the "IUSR" & "IIS_ISURS" users of my whole project. But still I am facing the same exception on my IIS.
asked Dec 24, 2019 alecxe 7.5k points
0 votes
1 answer 35 views
35 views
Problem : I have written two different types of sticky menus for two different pages. Following is the error Inside the anonymous function, use jquery to select the footer div. it has an id of 'footer'. Following is the code for both Menus. $(document).ready(function () { ... the bottom doesn't work because the second line of code var contentNav = $('.content-nav').offset().top; fires a error .
asked Nov 19, 2019 peterlaw 6.9k points
0 votes
1 answer 1.2K views
1.2K views
Problem : I am facing following error message: DOMException: Failed to load because no supported source was found in video.play(); line. I have started getting this issue only after adding following code: video.setAttribute('crossorigin', 'anonymous'); I am trying to develop an app in the mobile so ... 0); setTimeout(loop, 1000 / 30); // drawing at 30fps } })(); }, 0); </script> </body> </html>
asked Nov 27, 2019 alecxe 7.5k points