recently in the Learning Openlayer tutorial, through Openlayer loading GeoServer layer, which encountered the problem and resolved here to do the next record;
One, reference documents:
1. Learn the tutorial for the ' Openlayer Uncle ' of the tutorial, very good, very detailed, in the learning process encountered do not understand also consulted the author's help, very suitable for beginners to learn, address: Modify the features through WFS
2. After encountering the modified layer submission, the network displays 200,context Length:0,is read-only, these issues are in the workaround here
Ii. Concrete Steps
1. Load the SHP format file into the Postgresgis database and publish the loaded layer using the method PostGIS publish the layer in GeoServer, referring to my previous blog;
2. You can load and display the published layers by writing code in the tutorials of Uncle Drag.
3. The specific code is as follows:
<! DOCTYPE html>
Three, found the problem
1. Loading the map can appear, query features can appear, you can select and edit, click Save, the network transmission correctly without any error, but the return value is empty, the display prompt is "/ows: Exceptiontext>{http://postgregis.com}xian_polygon is Read-only "", guess should be a permission issue, after Baidu, in the second link to find the reference to the method;
Iv. Troubleshooting Steps
1. Open the GeoServer management interface, click on the "Data" tab in "Security" on the left, and click on "Rule path". W ", Check the box under" Grant Access to any role ", click Save, Clean the cache, then click Submit after the change, save the success.