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

Description

Hi,
I am working in an application that draw layers on the map. I am using Geoserver 2.11.2, PostgreSQL 9.6 and Leaflet. I want to draw GeoJson layer using leaflet and therefore required GeoJSON format data from WFS service. My geoserver is running on http://localhost:8080/geoserver and application that will call WFS service is on http://localhost:8081.
I successfully enabled JSONP in web.xml file. But when I change the web.xml file to Enable CORS and restart the geoserver , that did not work and geoserver stopped. Here is the location of web.xml file.

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

I uncomment the following lines in web.xml file 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>

Find the screenshot of error.

Please do help.

Environment

Windows 7 Professional 64 bit machine / GeoServer 2.11.2

Assignee

Unassigned

Reporter

MSharma

Triage

None

Fix versions

None

Affects versions

Components

Priority

High
Configure