[OpenLayers-Users] Help please, the proxy problem for my application

dolphintroop thymeland at hotmail.com
Thu Feb 21 05:20:41 PST 2013


Dear list:

I know the proxy of OL questions has been discussed again and again, but I
still face difficulty for my application.

My environment is:
Server A contained the web application, I used winXP,tomcat 6.0(uninstall
edition,url set as 192.168.0.102:8999),eclipse3.5
Server B contained geoserver and my sph data,the geoserver(2.2.4 edition,url
set as 192.168.0.108:8765) works fine.

I had been set the cgi proxy as the link below:
http://www.berndresch.com/blog/2011/11/01/installing-a-cgi-proxy-on-tomcat/
By a way, I just modify web.xml and context.xml in my application folder
under eclipse workspace,coz it's not the publish phase of this application,
and the proxy.cgi file put under WEB-INF/cgi folder.

I had test http://localhost:8999/myapp/cgi/proxy.cgi, from this link I can
visit the home page of openlayers.org, it looks like the proxy is working.

I test one of the examples of geoserver : GeoServer
2.2.4\data_dir\www\wfs-t.html,this file is working fine under Aptana
environment, so I modified the url link to my geoserver server,and the code
is as this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>

    
    
    
  </head>
  <body onload="init()">
    
OpenLayers WFS-T demo: Tasmania cities and roads

     Save Roads <#>  <br />
     Save Cities <#>  
    <div id="map"></div>
  </body>
</html>

This code is working under Aptana environment unless the road and cities do
not display coz the sake of calling wfs service.

When I add this line : OpenLayers.ProxyHost = "/demo/cgi/proxy.cgi?url="
above init(),
run the code under eclipse+tomcat environment, it show me a blank box
without map layer.

I try to add alert() function to debug and got a result that the code cannot
run init() function.

I donot know what's the cause , any help is appreciate!
Thank you in advanced!




--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Help-please-the-proxy-problem-for-my-application-tp5035827.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list