Ok I already have proxy.cgi which i have placed in the cgi-bin/. Here is the cgi-bin code <http://dpaste.de/8uzTm/>. I have added,
'128.196.142.94', '128.196.142.94:9000' but still the error persists. I have also added the required line in js code, OpenLayers.ProxyHost = "../cgi-bin/proxy.cgi?url="; Is there any particular reason, Y even now it is not working? Thanks, Smaran On Mon, Aug 20, 2012 at 4:32 PM, Phil Scadden <[email protected]> wrote: > > > > > > > So should I simply copy the jsp code that you have given into a file > > and name it proxy.jsp? > > > > And is there any other setting that you want me to do? > You can only run the jsp if you are working via tomcat. As is, that code > is an open proxy and it lacks the headers etc for a jsp page. What you > have to have a is way of telling whether the requested URL is valid or > not. Usual implementation is a white-list - somewhere in the code is a > list of allowed URLs. We have a much more complex scheme given the > nature of the maps that can be built (would be tedious tracking all the > WFS providers used) so there is a lot of code going into setting the > "okFlay". If you are using tomcat, then a simple generic proxy.jsp can > be got from https://github.com/terrestris/JSP-Whitelist-Proxy > > Just change the "allowedHosts" variable to list the URLs that you permit > (dont forget to include ports if not on :80) and put it in your > application directory. Add > OpenLayers.ProxyHost = "proxy.jsp?url="; > to your javascript and Ajax should work. > > > > Notice: This email and any attachments are confidential. If received in > error please destroy and immediately notify us. Do not copy or disclose the > contents. > > -- Thanks & Regards Smaran Harihar
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
