在 JBoss EAP AS 6.3 中使用 ant 获取 URL

在 JBoss EAP AS 6.3 中使用 ant 获取 URL

我有一个简单的 ant 任务来获取一个 url 并将其保存到文件中:

<target name="test_xhtml">
    <get verbose="on"
        dest="/tmp/test.xhtml"
        src="http://localhost:8080/forms/faces/test.xhtml?param=loremipsum" 
    />
</target>

脚本返回:

test_xhtml:
      [get] Getting: http://localhost:8080/forms/faces/test.xhtml?param=loremipsum
      [get] To: C:/tmp/test.xhtml
      [get] Error opening connection java.io.IOException: Server returned HTTP response code: 505 for URL: http://localhost:8080/forms/faces/test.xhtml?param=loremipsum
      [get] Error opening connection java.io.IOException: Server returned HTTP response code: 505 for URL: http://localhost:8080/forms/faces/test.xhtml?param=loremipsum
      [get] Error opening connection java.io.IOException: Server returned HTTP response code: 505 for URL: http://localhost:8080/forms/faces/test.xhtml?param=loremipsum
      [get] Can't get http://localhost:8080/forms/faces/test.xhtml?param=loremipsum to C:\tmp\test.xhtml
BUILD SUCCESSFUL
Total time: 468 milliseconds

好吧,问题是我如何获取 URL?(也许是 jboss 6.3 中的一些配置,因为 http 505 意味着 jboss 无法识别 ant 使用的 http 协议:请参阅http 规范#505

相关内容