Hi List, In the meantime I figured something out that works, so for the archive I'll share it here:
To trigger a WFS download (i.e. a 'Save file...' popup) and remain within the webpage without opening a new browser window can be done as follows within JavaScript (Heron MC/GeoExt in my case): - construct a regular WFS URL (GET) with Filter encoded as parameter - add the content-disposition=attachment etc params - create a hidden iframe and assign the above WFS URL to the iframe 'src' And voila: we have a WFS download to a file within the app! best, --Just Just van den Broecke www.justobjects.nl On 14-05-13 19:56, Just van den Broecke wrote: > Hi List, > > I am aware of GeoServer supporting the content-disposition=attachment > query parameters to force file download within the browser. This works fine. > > My case however is to try this from within OpenLayers using > OpenLayers-generated WFS requests. These WFS POST requests use Ajax > XMLHTTPRequest. Although content-disposition headers can be passed and > are rewarded by GeoServer, as per the design of Ajax, a download is > never triggered. > > Question is if there is another way, maybe with non-standard requests to > GeoServer via for example a HTTP form submit (sending WFS POST body as > Content-Type:application/x-www-form-urlencoded)? I will first try if > this can be done from GeoServer directly before resorting into > proxy-based solutions. > > Thanks for any suggestions, > > > --Just van den Broecke > www.justobjects.nl > > > > > > > ------------------------------------------------------------------------------ > AlienVault Unified Security Management (USM) platform delivers complete > security visibility with the essential security capabilities. Easily and > efficiently configure, manage, and operate all of your security controls > from a single console and one unified framework. Download a free trial. > http://p.sf.net/sfu/alienvault_d2d > _______________________________________________ > Geoserver-users mailing list > Geoserver-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geoserver-users > ------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d _______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users