i am parsing Xml using ajax function in jquery in a jsp file
$.ajax({
type: "GET",
url: "sites.xml",
dataType: "xml",
success: function(xml) {
}
});
My problem is my xml file is not in the same path as my jsp file. The jsp path is webProject/webcontent/temlates/store/SearchResult.jsp and the xml path is webProject/webcontent/WEB-INF/config/ampliflex.xml.
What should my url be in the $.ajax({ function?
Please Suggest
I would have thought that the WEB-INF directory would be private by default and so not accessible via an AJAX request. Try moving the XML file to some other part of your project.