Ok I already have proxy.cgi which i have placed in the cgi-bin/. Here is the <a href="http://dpaste.de/8uzTm/" target="_blank">cgi-bin code</a>. I have added,<div><br></div><div>'<a href="tel:128.196.142.94" value="+12819614294" target="_blank">128.196.142.94</a>', '<a href="http://128.196.142.94:9000" target="_blank">128.196.142.94:9000</a>' but still the error persists. I have also added the required line in js code,</div>




<div><br></div><div>OpenLayers.ProxyHost = "../cgi-bin/proxy.cgi?url=";</div><div><br></div><div>Is there any particular reason, Y even now it is not working?<br><br>Thanks,</div><div>Smaran<br><br><div class="gmail_quote">




On Mon, Aug 20, 2012 at 4:32 PM, Phil Scadden <span dir="ltr"><<a href="mailto:p.scadden@gns.cri.nz" target="_blank">p.scadden@gns.cri.nz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br>
><br>
><br>
> So should I simply copy the jsp code that you have given into a file<br>
> and name it proxy.jsp?<br>
><br>
> And is there any other setting that you want me to do?<br>
</div>You can only run the jsp if you are working via tomcat. As is, that code<br>
is an open proxy and it lacks the headers etc for a jsp page. What you<br>
have to have a is way of telling whether the requested URL is valid or<br>
not. Usual implementation is a white-list - somewhere in the code is a<br>
list of allowed URLs. We have a much more complex scheme given the<br>
nature of the maps that can be built (would be tedious tracking all the<br>
WFS providers used) so there is a lot of code going into setting the<br>
"okFlay". If you are using tomcat, then a simple generic proxy.jsp can<br>
be got from <a href="https://github.com/terrestris/JSP-Whitelist-Proxy" target="_blank">https://github.com/terrestris/JSP-Whitelist-Proxy</a><br>
<br>
Just change the "allowedHosts" variable to list the URLs that you permit<br>
(dont forget to include ports if not on :80) and put it in your<br>
application directory. Add<br>
  OpenLayers.ProxyHost = "proxy.jsp?url=";<br>
to your javascript and Ajax should work.<br>
<div><div><br>
<br>
<br>
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.<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Thanks & Regards<div>Smaran Harihar</div><br>
</div>