anon
anon

Reputation: 1117

malformed Java Net URL

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

Upvotes: 0

Views: 1171

Answers (1)

Adel Boutros
Adel Boutros

Reputation: 10295

try this:

url = new URL("http://localhost:9080/path/to/my/resource/myAction.action");

Upvotes: 1

Related Questions