hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Morgan, Brett A" <Brett.A.Mor...@team.telstra.com>
Subject HttpClient and MS Active Directory
Date Mon, 23 Apr 2007 09:26:20 GMT

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();
        	UsernamePasswordCredentials defaultcreds = new
UsernamePasswordCredentials(username, password);
        	client.getState().setCredentials(new AuthScope((new
URL(myURL)).getHost(), 80, realm), defaultcreds);
            GetMethod method = new GetMethod(myURL);
            int statusCode = client.executeMethod(method);

throws a java.net.UnknownHostException (myURL is the URL).

Is there a solution to this problem ? 

Brett Morgan

To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org

View raw message