【发布时间】:2012-02-13 23:08:08
【问题描述】:
我正在制作这样的网址
url = new URL("http","localhost",9080,"/path/to/my/resource/myAction.action");
而不是制作网址:
http://localhost:9080/path/to/my/resource/myAction.action
它发出请求:
http://www.localhost.com/path/to/my/resource/myAction.action
【问题讨论】:
-
你确定吗?尝试打印 url 的内容,因为当我尝试打印 url 的内容时,它是
http://localhost:9080/path/to/my/resource/myAction.action -
试过了,给我打印错误的网址..