Karthi,

HostConfiguration associated with HttpClient instance represents default host 
information. These settings are used only when the target host and port are not 
explicitly specified on the HttpMethod level.

HttpClient agent = new HttpClient();
agent.getHostConfiguration().setHost("localhost", 8080);

HttpMethod absolute = new GetMethod("www.whatever.com/stuff");
// will target the host specified in the URL

HttpMethod relative = new GetMethod("/stuff");
// no host name given in the URL. Will target the default host, that is 'localhost'

Hope this clarifies things a little

Oleg




-----Original Message-----
From: Karthikeyani K [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 10, 2004 15:39
To: [EMAIL PROTECTED]
Subject: parameter of setHost method in HostConfiguration of httpClient


Hi,
When we set Host on the HostConfiguration of the httpClient using setHost method 
(setHost(host)), does the host correspond to the server host or the client host.

When I try to close a connection by using
  cleint.getHttpConnectionmanager.getConnection(client.getHostConfiguration()).close,
I am getting the error stating host is null. So I have to set the host on the 
hostConfiguration, so does this host correspond to the server host or the client host 
itself.

Please advice.....


Thanks,
Karthi

        
---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!

***************************************************************************************************
The information in this email is confidential and may be legally privileged.  Access 
to this email by anyone other than the intended addressee is unauthorized.  If you are 
not the intended recipient of this message, any review, disclosure, copying, 
distribution, retention, or any action taken or omitted to be taken in reliance on it 
is prohibited and may be unlawful.  If you are not the intended recipient, please 
reply to or forward a copy of this message to the sender and delete the message, any 
attachments, and any copies thereof from your system.
***************************************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to