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.
Find the screenshot of error.
Please do help.
Windows 7 Professional 64 bit machine / GeoServer 2.11.2