为啥 proxy.cgi 没有执行?

Posted

技术标签:

【中文标题】为啥 proxy.cgi 没有执行?【英文标题】:Why is proxy.cgi not executing?为什么 proxy.cgi 没有执行? 【发布时间】:2011-11-02 06:32:19 【问题描述】:

当我输入 url ..“http:localhost:9999/my-app/cgi-bin/proxy.cgi”时,我得到的是 proxy.cgi 而不是 openlayers.org 的脚本。 我在端口 9999 中使用 Glassfish 3.0.1,在端口 8080 中使用 Geoserver 2.1.1。 我正在 Windows 7 中做我的项目。

【问题讨论】:

【参考方案1】:

这是因为您的 Glassfish 应用服务器未配置为运行 CGI。看看这个资源:http://jfarcand.wordpress.com/2006/04/06/enabling-cgi-support-in-glassfish/

我希望它会有所帮助。

顺便说一句,您提到的 URL http:localhost:9999/my-app/cgi-bin/proxy.cgi 似乎是错误的:“http:”后面的 2 个斜杠丢失了。应该是:http://localhost:9999/my-app/cgi-bin/proxy.cgi

【讨论】:

感谢您的回答。我已相应地关注jfarcand.wordpress.com/2006/04/06/…,但没有成功。我在Web-inf下创建了cgi文件夹并将proxy.cgi放在它下面。我有这个@987654324 @ 但仍然出现空白页。Live HttpHeader 显示此 GET /TravelPlanner-00/cgi-bin/proxy.cgi HTTP/1.1 主机:localhost:9999 用户代理:Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko /20100101 Firefox/6.0.2 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 Accept-Language: en-us,en;q =0.5 Accept-Encoding: gzip, deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Connection: keep-alive Cookie: JSESSIONID=61f3f041565ef7f10df44bfb04d3; JSESSIONID=608c2c61c7ff937b40b4108a3ed1; treeForm:tree-hi=treeForm:tree:configuration:httpService HTTP/1.1 200 OK X-Powered-By: Servlet/3.0 Server: GlassFish Server Open Source Edition 3.0.1 Content-Length: 0 Date: Wed, 02 Nov 2011 21:36:15 GMT

以上是关于为啥 proxy.cgi 没有执行?的主要内容,如果未能解决你的问题,请参考以下文章

为啥.bss段没有可执行属性?

为啥我的保存功能没有完全执行?

c ++:为啥执行回调但回调定义之前的函数没有?

为啥这个计算代码没有正确执行?

为啥 PLSQL 中的代码在“异常”部分之后没有执行?

Spring定时任务为啥没有执行