I'm working on localhost:8080 and want to get WFS data in a Leaflet map. So, I've read in some posts here that I first I have to enable Jsonp in my web.xml file in Geoserver. So I put
But I can't see that Jsonp is allowed with a getCapabilities :
text/xml; subtype=gml/3.2 GML2 KML SHAPE-ZIP application/gml+xml; version=3.2 application/json application/vnd.google-earth.kml xml application/vnd.google-earth.kml+xml application/x-gpkg csv geopackage geopkg gml3 gml32 gpkg json text/xml; subtype=gml/2.1.2 text/xml; subtype=gml/3.1.1
Then, I tried to load my WFS data into a GeoJson layer in leaflet with this code :
And firefox's console return
SyntaxError: missing ; before statement ows:1:7
Is someone knows why it doesn't work ?
Have you restartet Tomcat / Geoserver after editing the web.xml?
Your capabilities should show this entry: