-3

I have just started to run in this problem! I have seen a lot of your guys questions and tried a lot of solutions but none of them works for me! I tried loading chrome from the command prompt with the code to allow files but didn't work. Why is this showing up? Also i don't understand any of Ajax so if possible please answer in more detail! This is the css :

div.jumbotron.hero{
  background-image:url(C:/Users/INFORMATIKA/Desktop/banner.jpg);
}

This is the html I am using to put the image in the back:

<div class="jumbotron hero">
        <div class="container">
            <div class="row">
                <div class="col-md-6 col-md-offset-6 col-md-pull-3 get-it">
                    <h1 class="text-uppercase text-center"><strong>Mirësevini </strong></h1>
                    <p class="text-center" id="umire">në IB - Learning , web-aplikacionin e krijuar nga Islam Bekaj </p>
                    <p></p>
                </div>
            </div>
        </div>
    </div>

I am using XAMPP and used bootstrap for the css!

Haxhi Bekaj
  • 47
  • 1
  • 7

1 Answers1

0

sending tag <img src="C:/xampp/htdocs/bootstrap/images/banner.jpg"> would cause user browser to access image from his filesystem, not your server. if you have to store images in folder located in C:/xampp/htdocs/bootstrap/images/ i would suggest to create an servlet like images.jsp, that as a parameter takes name of a file, then sets servlet response content to an image/jpg and then loads bytes of image from server location and put it to a response.

Got this from "Not allowed to load local resource: file:///C:....jpg" Java EE Tomcat

Community
  • 1
  • 1
mtchdev
  • 66
  • 11