You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by "Morgan, Brett A" <Br...@team.telstra.com> on 2007/04/23 11:26:20 UTC
HttpClient and MS Active Directory
Hullo.
I am a new user of HttpClient.
I have a URL for a server on an intranet that is resolved using
Microsoft Active Directory.
When I try to use this same URL with HttpClient from a linux box
I get a java.net.UnknownHostException: i.e.
HttpClient client = new HttpClient();
client.getParams().setAuthenticationPreemptive(true);
UsernamePasswordCredentials defaultcreds = new
UsernamePasswordCredentials(username, password);
client.getState().setCredentials(new AuthScope((new
URL(myURL)).getHost(), 80, realm), defaultcreds);
GetMethod method = new GetMethod(myURL);
method.setFollowRedirects(true);
int statusCode = client.executeMethod(method);
throws a java.net.UnknownHostException (myURL is the URL).
Is there a solution to this problem ?
Thanks,
Brett Morgan
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org