I am no expert on this but have battled royally with the problem getting OL application working off a USB.
Why need a proxy? Well because usually you have your application (especially the host page) on one server and geoserver somewhere else. Since the browsers started tightening up security on XHR, the restriction has been that XHR request need to reference an item in same directory as your OL page or in a subdirectory of that. Obviously mapserver/geoserver will be somewhere else. What OL needs to do is switch its http requests through a proxy. In my system, I have proxy.jsp in my main directory, with proxyhost pointing to it. So instead of GET to http://myserver, it generates proxy.jsp?url=http://mygeoserver Proxy.jsp checks the URL to see if it is one my allowed hosts, opens the url, fetches data and pipes back to OL. This is different from using a web proxy in your lab network configuration. Using cgi is another way implement the proxy. Its my understanding, that any OL function implemented to use a callback is going to go through XHR, so to use those you must have OpenLayers.proxyhost configured. Somethings can be implemented without the proxy (especially WFS) by using script protocol. Script injection is another way avoid cross-site restrictions, but it depends on server able to wrap response (json) in a callback function. 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. _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
