Export to Excel

Discussion created by samirgambhir on Mar 8, 2013
Latest reply on Mar 10, 2013 by rahul_m
I am using ArcGIS Server 10.1 JavaScript API 3.2.

I have a Java code on a remote server which can take JSON array from my application and convert it to an Excel spreadsheet. My application is hosted on Amazon Cloud. Each time I make a call to the remote server using xmlHttp request, it rejects it with the error 404 (not found). I understand it could be a cross domain issue, and we tried putting a header in our Java code such as  'header(�??Access-Control-Allow-Origin: http://myWebAppAddress�?�)' but it did not work. We also tried placing the code in my local server and tried it with local insttall of my app and it failed again. However, if I create a string for the URL for the remote server and place it in the adress bar of my browser, the Java code executes and downloads the excel file on my machine. Javascript console message provides me the request URL as "http://localhost:8080/myApFolderOnTomcat/"http://remoteIP:8080/codeFolderName/{....}". Is it normal for the request header to have my local host address as well? I'll really appreciate it if someone can help me resolve this.