commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allistair Crossley" <a.cross...@obvious.uk.com>
Subject HttpClient PostMethod Path NoRouteToHostException
Date Wed, 24 Apr 2002 10:48:07 GMT
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:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message