AnsweredAssumed Answered

Need steps to configure CORES for JSAPI

Question asked by sunilpalkar on Oct 1, 2014
Latest reply on Oct 1, 2014 by khutchins-esristaff

Hello All,

 

I am using ESRI suit 10.1 and ArcGIS Server installed on Amazon instance. We are consuming Map services in JSAPI and while executing map, getting CROSS domain error.

 

I have checked this rest service and wondering that no CORS error getting. (It might be version 10.0)

 

Tried following things:

 

1.Used following things:

 

esri.config.defaults.io.corsEnabledServers.push("http://myserver.com/arcgis/rest/services");

esri.config.defaults.io.corsEnabledServers.push("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services")

 

2.Added following things in web.xml in tomcat 8.0

 

<filter>

<filter-name>CorsFilter</filter-name>

<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>

</filter>

<filter-mapping>

<filter-name>CorsFilter</filter-name>

<url-pattern>/*</url-pattern>

</filter-mapping>

 

3.Searched on Google regarding this.

 

Attached screen-shot so any help regarding this will be great!!

Attachments

Outcomes