[Geoserver-devel] [JIRA] (GEOS-8273) Could not enable CORS in Geoserver 2.11.2 on Windows 7 64 bit machine

MSharma created an issue

GeoServer / BugGEOS-8273

Could not enable CORS in Geoserver 2.11.2 on Windows 7 64 bit machine

Issue Type:

BugBug

Affects Versions:

2.11.2

Assignee:

Unassigned

Attachments:

503_Error.PNG

Components:

Configuration

Created:

06/Sep/17 4:59 PM

Environment:

Windows 7 Professional 64 bit machine / GeoServer 2.11.2

Priority:

HighHigh

Reporter:

MSharma

Hi,
I am working in an application that render layers on map. I am using Geoserver 2.11.2,PostgreSQL and Leaflet. I want to access layers in GeoJSON format by calling WFS service so that they can be used by Leaflet.My geoserver is running on *http://localhost:8080/geoserver* and my application that will call WFS service is on *http://localhost:8081*.
I successfully enable JSONP in web.xml file. But when I changed in the following file to Enable CORS , that did not work.

C:\Program Files (x86)\GeoServer 2.11.2\webapps\geoserver\WEB-INF\web.xml

I uncomment the following lines and restart the geoserver.

<filter-mapping>
<filter-name>cross-origin</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<filter>
<filter-name>cross-origin</filter-name>
<filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>
</filter>

Then get the error attached.

Please do help.

Add Comment

Add Comment

Get JIRA notifications on your phone! Download the JIRA Cloud app for Android or iOS


This message was sent by Atlassian JIRA (v1000.1257.0#100059-sha1:0d58106)

Atlassian logo