Dear All,

I have installed Geoserver 2.4.0 on Windows 2008 Server with IIS7.(without
using Tomcat) I can render the Geoserver layer in my web application which
is in my location machine. But when I click on any feature to get
information, I have received the following error message.

XMLHttpRequest cannot load
http://xxx.xxx.xx.xx:8080/geoserver/cite/gwc/service/wms?LAYERS=cite%3APlym...%2Fpng&INFO_FORMAT=application%2Fvnd.ogc.gml&SRS=EPSG%3A404000&X=802&Y=320<http://192.168.0.161:8080/geoserver/cite/gwc/service/wms?LAYERS=cite%3APlymouth_Buildings,cite%3APlymouth_Buildings&QUERY_LAYERS=cite%3APlymouth_Buildings,cite%3APlymouth_Buildings&STYLES=,&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=248556.234266%2C55257.75593%2C248953.095734%2C55439.44407&FEATURE_COUNT=10&HEIGHT=586&WIDTH=1280&FORMAT=image%2Fpng&INFO_FORMAT=application%2Fvnd.ogc.gml&SRS=EPSG%3A404000&X=802&Y=320>.
No 'Access-Control-Allow-Origin' header is present on the requested
resource. Origin 'http://localhost:3311 <http://localhost/>' is therefore
not allowed access.


The same issue I have faced when I was configured the Geoserver on Tomcat7
in another Windows 2008 Server. At that time I have added the below things
in C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\web.xml
file. Afterthat issue was solved.

<filter>
  <filter-name>CorsFilter</filter-name>
  <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
  <init-param>
    <param-name>cors.allowed.origins</param-name>
    <param-value>*</param-value>
  </init-param>
  <init-param>
    <param-name>cors.allowed.methods</param-name>
    <param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
  </init-param>
  <init-param>
    <param-name>cors.allowed.headers</param-name>

<param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers</param-value>
  </init-param>
  <init-param>
    <param-name>cors.exposed.headers</param-name>

<param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value>
  </init-param>
  <init-param>
    <param-name>cors.support.credentials</param-name>
    <param-value>true</param-value>
  </init-param>
  <init-param>
    <param-name>cors.preflight.maxage</param-name>
    <param-value>10</param-value>
  </init-param>
</filter>
<filter-mapping>
  <filter-name>CorsFilter</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>

So how & where should I add this in my current case. Kindly give me a
solution to fix this error. Thanks in advance

Thanks & Regard,
Venkat E,
GIS Developer.
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to