I have this javascript code: d3.json("data.json", function(error, data) { // ..} and data.json is a file that I am storing in my laptop. When I try to run this, the html page does not show any data. Looking into the internet I've found that this is due to the fact that I am attempting to do an XmlHttpRequest without a server (ie, just running directly from local filesystem instead of via a web server). I never used a server, so I am kinda lost. I know that to deploy a website in tomcat server you need to generate a war file. but is this all, If I set the proper path where my json file is in the javascript code and generate a war file of the website and deploy it, will this works fine? and if so is there something I should specify in the web.xml file? I know this is probably a bit silly but I never used a server, so I will really appreciate your hints.
Aucun commentaire:
Enregistrer un commentaire