RE: PostMethod setQueryString

2004-08-20 Thread Karthikeyani K
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

PostMethod setQueryString

2004-08-20 Thread Karthikeyani K
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

RE: HttpClient ConnectionTimeOut

2004-08-20 Thread Karthikeyani K
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:

HttpClient ConnectionTimeOut

2004-08-20 Thread Karthikeyani K
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

RE: parameter of setHost method in HostConfiguration of httpClient

2004-08-10 Thread Karthikeyani K
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

Re: parameter of setHost method in HostConfiguration of httpClient

2004-08-10 Thread Karthikeyani K
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

RE: parameter of setHost method in HostConfiguration of httpClient

2004-08-10 Thread Karthikeyani K
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

RE: parameter of setHost method in HostConfiguration of httpClient

2004-08-10 Thread Karthikeyani K
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

RE: parameter of setHost method in HostConfiguration of httpClient

2004-08-10 Thread Karthikeyani K
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: [

parameter of setHost method in HostConfiguration of httpClient

2004-08-10 Thread Karthikeyani K
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

Re: Invoke a httpclient in a EJB

2004-08-06 Thread Karthikeyani K
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

Re: Invoke a httpclient in a EJB

2004-08-05 Thread Karthikeyani K
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

Re: Invoke a httpclient in a EJB

2004-08-05 Thread Karthikeyani K
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 >

Re: Invoke a httpclient in a EJB

2004-08-05 Thread Karthikeyani K
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

Invoke a httpclient in a EJB

2004-08-04 Thread Karthikeyani K
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

Re: Realm for NTLM Authentication

2004-07-30 Thread Karthikeyani K
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

Realm for NTLM Authentication

2004-07-30 Thread Karthikeyani K
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.

Username and password encoding

2004-07-29 Thread Karthikeyani K
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