<DIV>Hi <BR>I came across error when using Tomcat 5.5 under Windows OS to set the proxy work properly. I have remove the comment of the servlet and mapping, and renname the jar folloing the steps found on Apache site. But when I try to acess the <A href="http://localhost:8080/geoserver/cgi-bin/proxy.cgi,I">http://localhost:8080/geoserver/cgi-bin/proxy.cgi,I</A> always get a error:<BR>Some unexpected error occurred. Error text was: &lt;urlopen error (11001, 'getaddrinfo failed')&gt;</DIV>
<DIV>I can get a&nbsp; <A href="http://localhost:8080/geoserver/cgi-bin/test1.cgi">http://localhost:8080/geoserver/cgi-bin/test1.cgi</A> work&nbsp;and&nbsp;print "hello world" on the browser.</DIV>
<DIV>The cotent of test1.cgi is below:</DIV>
<DIV>*************</DIV>
<DIV>#!C:\Python25\python -u</DIV>
<DIV>import urllib2<BR>import cgi<BR>import sys, os<BR>import urllib</DIV>
<DIV><BR>print "hello world"</DIV>
<DIV>**************</DIV>
<DIV>&nbsp;</DIV>
<DIV>And I write a test2.cgi:<BR>************<BR>#!C:\Python25\python -u<BR>import urllib2<BR>import cgi<BR>import sys, os<BR>import urllib<BR># Designed to prevent Open Proxy type stuff.</DIV>
<DIV>try:<BR>&nbsp;the_url = "<A href="http://www.google.com">http://www.google.com</A>"<BR>&nbsp;req = urllib2.urlopen(the_url)<BR>&nbsp;print req.read()<BR>except Exception, E:<BR>&nbsp;&nbsp;&nbsp; print "Status: 500 Unexpected Error"<BR>&nbsp;&nbsp;&nbsp; print "Content-Type: text/plain"<BR>&nbsp;&nbsp;&nbsp; print <BR>&nbsp;&nbsp;&nbsp; print "Some unexpected error occurred. Error text was:", E<BR>&nbsp;the_url = "<A href="http://www.google.com">http://www.google.com</A>"<BR>&nbsp;req = urllib2.urlopen(the_url)<BR>************/</DIV>
<DIV>When&nbsp;I&nbsp;access&nbsp;&nbsp;<A href="http://localhost:8080/geoserver/cgi-bin/test2.cgi">http://localhost:8080/geoserver/cgi-bin/test2.cgi</A>&nbsp;I get the same error:
<DIV>&nbsp;Some unexpected error occurred. Error text was: &lt;urlopen error (11001, 'getaddrinfo failed')&gt;</DIV>
<DIV>So I think the problem is the urllib2.urlopen(). But I can get it work properly using console command: pythoy test2.cgi and get the html content, but after I put it under tomcat I get such a error, I don't know why,&nbsp;is it because I didn't configur&nbsp;the &nbsp;Tomcat correctly?</DIV></DIV>
<DIV>Thank you, best regards!</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lorkyo</DIV><br><!-- footer --><br> 
<hr>
<a style="font-size:12px;line-height:15px; color:blue; text-decoration:underline;" href="http://popme.163.com/link/004572_0806_4537.html">想免费升级vip邮箱吗?</a><font style="font-size:12px;line-height:15px;">快来参加喝汇源游网易活动吧!</font>