标签:代码 设置 app iss arcgis edm red tomcat modified
https://blog.csdn.net/u012123612/article/details/53638537 ARCGIS SERVICE 10.2跨域问题处理
Arcgis Server 10.2 跨域配置
Arcgis10.3及以上版本已经默认开启跨域设置。本文只讲10.2版本的跨域配置。
一.下载cors-filter-1.7.jar,Java-property-utils-1.9.jar这两个库文件,放到C:\Program Files\ArcGIS\Server\framework\runtime\tomcat\lib目录下
二. 修改C:\Program Files\ArcGIS\Server\framework\runtime\tomcat\conf\web.xml 文件
在 <filter>标签平级末尾处添加以下xml代码 (490行左右)
<filter>
<filter-name>CORS</filter-name>
<filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>
<init-param>
<param-name>cors.allowOrigin</param-name>
<param-value>*</param-value>
</init-param>
<init-param>
<param-name>cors.supportedMethods</param-name>
<param-value>GET, POST, HEAD, PUT, DELETE</param-value>
</init-param>
<init-param>
<param-name>cors.supportedHeaders</param-name>
<param-value>Accept, Origin, X-Requested-With, Content-Type, Last-Modified</param-value>
</init-param>
<init-param>
<param-name>cors.exposedHeaders</param-name>
<param-value>Set-Cookie</param-value>
</init-param>
<init-param>
<param-name>cors.supportsCredentials</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CORS</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
重启服务
Arcgis ArcgisServer
文章转载自: 葱爆GIS—刘博方GIS博客( https://liubf.com )
标签:代码 设置 app iss arcgis edm red tomcat modified
原文地址:https://www.cnblogs.com/baimy/p/14605427.html