d.setRequestBody(NameValuePair[]) method takes a
array of name/value pairs and constructs a request body out of them using URL
encoding. PostMethod.setQueryString(NameValuePair[]) method can be used to pass
parameters as a part of the request URL
HTH
Oleg
-Original Message-
From: Karthikeyani
Hi,
What is the difference between invoking setQueryString(NameValuePair[]) and
setRequestBody(NameValuePair[]) on PostMethod.
When we try to use setQueryString(NameValuePair[]), we are getting the response
back.
But when we try to use setRequestBody(NameValuePair[]), we are getting
you using 2.0.x (stable) or 3.0-alpha1. HttpClient 2.0
throws org.apache.commons.httpclient.HttpConnection.ConnectionTimeoutException to
signal a connect timeout. HttpClient 3.0 does
org.apache.commons.httpclient.ConnectTimeoutException
Oleg
-Original Message-
From: Karthikeyani K [mailto:
Hi,
We have set ConnectionTimeout for httpclient to 1 milliseconds. What
exeception does it throw when a Connection times out. How do we track that a
connection has timed out. If a connection times out, we need to send a response to the
user to try later.
Thanks,
Karthi
arbitrary connection. Am I right?
You are right.
Oleg
-Original Message-
From: Karthikeyani K [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 10, 2004 19:37
To: Commons HttpClient Project
Subject: RE: parameter of setHost method in HostConfiguration of
httpClient
Thanks a lot Kalni
e correct one. The latter (option 2)
> _should_ work with the simple connection manager but it is guaranteed
> to not produce the desired effect with the multi-threaded connection
> manager
>
> Oleg
>
> -----Original Message- From: Karthikeyani K
> [mailto:[EMAIL PR
not produce the desired effect with
the multi-threaded connection manager
Oleg
-Original Message-
From: Karthikeyani K [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 10, 2004 18:58
To: Commons HttpClient Project
Subject: RE: parameter of setHost method in HostConfiguration of
httpClient
Kaln
the one that has just been used to execute
the request.
Cheers,
Oleg
-Original Message-
From: Karthikeyani K [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 10, 2004 16:57
To: Commons HttpClient Project
Subject: RE: parameter of setHost method in HostConfiguration of
httpClient
Tha
hod 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: [
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
thanks mike.
Michael Becke <[EMAIL PROTECTED]> wrote:Hi Karthi,
> So does the following code snippet perform what Mike have mentioned...
> HttpClient client=new HttpClient(); // Which will create a
> SimpleHttpConnectionManager
> // by default. So we
> need not create an explicit
>
> //Httpcon
e connection
postmethod.releaseConnection();
// Close the socket connection
client.getHttpConnectionManager().getConnection().close();
Is this the correct way of closing the connection.
Thanks,
Karthi
Karthikeyani K <[EMAIL PROTECTED]> wrote:
Thanks Mike. Now I understand that we can use HttpClient
Limited
[EMAIL PROTECTED]
On 4 Aug 2004, at 16:20, Karthikeyani K wrote:
> Hi,
> We have all requests posted to a servlet which delegates the
> request to a Stateless Session Bean. Does creatring and invoking a
> Httpclient postmethod in a helper class invoked by the Stateless
>
suggest
creating a simple HttpConnectionManager (very similar to
SimpleHttpConnectionManager) that you can force close the connection with.
Mike
Karthikeyani K wrote:
> Thanks everyone.
>
> The EJB restrictions specified at
> http://java.sun.com/blueprints/qanda/ejb_tier/restrictio
Hi,
We have all requests posted to a servlet which delegates the request to a
Stateless Session Bean. Does creatring and invoking a Httpclient postmethod in a
helper class invoked by the Stateless Session Bean violate any of the EJB
specifications. (EJB spec says sockets are not to be cr
Thanks a lot Mike.
Michael Becke <[EMAIL PROTECTED]> wrote:Hi Karthi,
Using null for the NTLM realm is the way to go. This is covered in a
little more detail at
.
Mike
Karthikeyani K wrote:
> Mike, thanks for the answer for my previous question.
>
> I have one more clarific
Mike, thanks for the answer for my previous question.
I have one more clarification regarding specifying the realm when setting credentials.
Is it okay to specify "null" value for realm when setting credentials for NTLM
authentication. Does specifying null value, cause any security violation.
Hi,
We are using NTCredentials class from httpClient (commons-httpclient-2.0.jar) for NTLM
Authentication. Just wanted to know whether the username and password passed to the
constructor of NTCredentials be encoded by using Base64 encoding. or should it be
passed as a normal username and passwor
18 matches
Mail list logo