I am making a url like this
url = new URL("http","localhost",9080,"/path/to/my/resource/myAction.action");
instead of making the url:
http://localhost:9080/path/to/my/resource/myAction.action
its making the request to:
http://www.localhost.com/path/to/my/resource/myAction.action
http://localhost:9080/path/to/my/resource/myAction.action