I am trying to print an Openlayers map using GeoExt and Geoserver. Here is the code

printProvider = new GeoExt.data.PrintProvider({
        url: printServiceURL,
        method: "POST", // "POST" recommended for production use
        capabilities: printCapabilities, // provide url instead for lazy loading
        listeners: {
            "print": function () { printDialog.close(); },
            "printexception": function(printProvider, response) { alert('Error ' +    response.statusText); }

I am getting the desired output when I am using GET method but it does not work using POST method. What could be the issue ?

  • I am having the same problem. In my case when I use POST the server refuses permission to make the request because it thinks that I am violating the "same origin" policy. But, I have a proxy and I use IIS URL-rewrite so I'm not sure what the problem is. I have been looking to solve this problem for 18 months now. – Todd Krueger May 5 '16 at 20:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.