I encounter this problem :
I have a django (python) server that serve XML files on localhost:8000
I have a liferay project using tomcat on localhost:8080, that need to call this XML files (in javascript with ajax)
It call the files, but never get them.
What do I have to do for tomcat to get this file ?
Thanks by advance.
Edit:
here is my request :
$.ajax({
type: 'GET',
url: "http://127.0.0.1:8000/charger/entreprise/",
dataType: "xml",
crossDomain : true,
success: function(xml){
alert(xml);
}
});
here is my request header :
Host 127.0.0.1:8000
User-Agent Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20100101 Firefox/8.0
Accept application/json, text/javascript, */*; q=0.01
Accept-Language fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding gzip, deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection keep-alive
Referer http://localhost:8080/web/guest/home
Origin http://localhost:8080
In fact, I wonder if the problem come from the javascript, I think its because of the servers.
After trying many solution that didn't work, I finally have solved my problem You guys were right, JSONP was the solution, even if I had to adapt it to django, and my specific problem, which was not easy at all.