You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Allistair Crossley <a....@obvious.uk.com> on 2002/04/24 12:48:07 UTC

HttpClient PostMethod Path NoRouteToHostException

Hi,

Thanks for the solution to my last problem. I took the HTTP:// out of the
host parameter and it worked fine for urls with port 80.

However, I have come across another problem. I need to request a URL of the
type

http://123.456.78.9:8026/page.asp

(my port is 8026) and requesting the IP:8026 in a browser works fine.

At the moment I am trying to do this...

PostMethod postMethod = new PostMethod("/page.asp");

HttpClient httpClient = new HttpClient();
httpClient.startSession("123.456.78.9", 8026);
httpClient.executeMethod(postMethod);
httpClient.endSession();

System.out.println(postMethod.getResponseBodyAsString());

I get a NoRouteToHostException however so I guess it is having trouble
getting into the port??

Help appreciated,

Allistair Crossley
Lead Technical Developer
Obvious Solutions (Global) Ltd.
“Delivering the vision for a mobile lifestyle”

www.obvioussolutions.co.uk

(m) +44 (0) 7884 056 274
(w) +44 (0) 20 8451 9352
(f) +44 (0) 20 8537 5236

/******************************************/

This is an email from Obvious Solutions (Global) Ltd.
The contents of this email are confidential to the ordinary
user of the email address to which it was addressed. No-one
else may copy or forward all or any of it in any form.
If you receive this email in error, we should be obliged if
you would telephone our postmaster on +44 (0)208 357 8352
or  email postmaster@obvious.uk.com. Thank you.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>