I am in the process of learning for doing WFST - OpenLayers in web. I followed this tutorial in the GisTutor.

But I am stuck with two problems:

  • the WFS-T layer is not appearing
  • the feature created in client cannot be saved (no response when save button is clicked, and accordingly there is no additional row in the PostGIS table of WFST_TEST)

I followed this GIS.SE question and I also do not configured the Proxypass as instructed here (also because I do not have Apache running the GeoServer).

In the latter part of the discussion between Janne Mattila with Iant, Iant suggests that:

don't run from file://somefolder/mytestpage.html always use localhost:28080/geoserver/www/mytestpage.html this should fix your problem. – iant

and then Janne seems to be happy:

Nice and simple, that fixed it! I don't fully understand why it works like that, though. Can you explain what happens in OpenLayers when I access the page using file:// and when I use localhost:28080 instead? – Janne Mattila

I finally able to call my hHTML by localhost:8080/geoserver/www/rinotestpage.html in my browser, by putting my rinotestpage.html and the THEME folder (for bringing button PNG files to the app) into the C:\Program Files\GeoServer 2.3.2\data_dir\www. But my 2 problems in the above are persisting (WFS-T layer not appeared and feature created in client is not saved)

My question:

  1. Janne and Iant, how did you crack this? How to solve the problem (WFS-T layer not appearing)?
  2. Janne, did you put your testpage.html in the same folder as i did ? (C:\Program Files\GeoServer 2.3.2\data_dir\www).

For additional infos:

  1. I am using : PostgreSQL Windows 32-bit + PostGIS + GeoServer 2.3.2 + Windows Server 2003 in VMWare Player 5.0.2
  2. I can see in my firebug that there is "POST wfs" request to my http://localhost:8080/geoserver/wfs, but the request took forever and no response. I am guessing this is why my WFS-T layer is not shown.

enter image description here

  • maybe the problem is with your wfs configuration. Are you able to do GetCapabilites from the server. For your case try this - localhost:8080/geoserver/…. For more info see geoserver manual - docs.geoserver.org/latest/en/user/services/wfs/reference.html
    – rkm
    Commented May 22, 2013 at 9:01
  • @rashad, yes i can do that even from my browser of the host computer (// Even I can also do the DescribeFeatureType request (//, with valid result. Any other things i must also check? Thanks for your comment.
    – Rino
    Commented May 22, 2013 at 9:09
  • @rashad, also I can see my WFS/WMS of the "cite:wfst_test" from my Quantum GIS. In Quantum GIS i add a WFS layer from that, on top of Google Maps or OpenStreetMaps (openlayers plugin) with correct position. The "cite:wfst_test" is in EPSG 26910. So in my opinion my GeoServer serves WFS/WMS nicely, but the OpenLayers in my test.html can not get the WFS (imho).
    – Rino
    Commented May 22, 2013 at 9:17
  • Did you tried OpenLayers proxy host as described in section - Configuring an OpenLayers proxy.cgi for Loading Local and Remotely Hosted GeoServer WFS Data of page - gistutor.com/geoserver/21-intermediate-geoserver-tutorials/…
    – rkm
    Commented May 22, 2013 at 9:28
  • @rashad, as in my post, i did not do the proxy thing described here, because (1) i do not know how to do that, and (2) there's no Apache in my geoserver -similar to Janne's post link. Please advise. Am so eager to get this runs :D . FYI I am pure GIS guy rather than a web dev guy or DB guy.
    – Rino
    Commented May 22, 2013 at 9:40

1 Answer 1


I am adding this as answer because OL proxyHost should solve your issue. I understood you didn't have apache. But openlayers uses a proxy.cgi and as mentioned in the Janne's link did you commented out the lines in proxy.cgi. you can search for proxy.cgi (don't know the exact location in geoserver distribution). But it happens to be in openlayers/examples/proxy.cgi. It will be better if you search for this file. An example of proxy.cgi is given here.


OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";


// OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";

in the .cgi file

Hope that helps

  • I just don't get this. Just like Janne did, I also commented the proxyhost in my html file. But you suggest me to do that in a proxy.cgi file in GeoServer. Rashad, i do not have that file in my GeoServer. So, where do i have to do that? FYI I installed my GeoServer by a windows installer (not by binary or by web archive).
    – Rino
    Commented May 24, 2013 at 8:34
  • This tutorial says that "A work around for this is to create a proxy.cgi script, and save it in the cgi-bin directory of your Apache Web Server". While you are aware that I have no Apache. Please advise.
    – Rino
    Commented May 24, 2013 at 9:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.