Return-Path: Delivered-To: apmail-jakarta-httpclient-dev-archive@www.apache.org Received: (qmail 36161 invoked from network); 8 Dec 2004 10:29:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 8 Dec 2004 10:29:08 -0000 Received: (qmail 18249 invoked by uid 500); 8 Dec 2004 10:29:04 -0000 Delivered-To: apmail-jakarta-httpclient-dev-archive@jakarta.apache.org Received: (qmail 18228 invoked by uid 500); 8 Dec 2004 10:29:04 -0000 Mailing-List: contact httpclient-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "HttpClient Project" Reply-To: "HttpClient Project" Delivered-To: mailing list httpclient-dev@jakarta.apache.org Received: (qmail 18215 invoked by uid 99); 8 Dec 2004 10:29:04 -0000 X-ASF-Spam-Status: No, hits=0.3 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_40_50,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mtagate2.de.ibm.com (HELO mtagate2.de.ibm.com) (195.212.29.151) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 08 Dec 2004 02:29:02 -0800 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate2.de.ibm.com (8.12.10/8.12.10) with ESMTP id iB8ASwbP177432 for ; Wed, 8 Dec 2004 10:28:58 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id iB8ATBOb153870 for ; Wed, 8 Dec 2004 11:29:11 +0100 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11/8.12.11) with ESMTP id iB8ASvXO016974 for ; Wed, 8 Dec 2004 11:28:57 +0100 Received: from d12ml067.megacenter.de.ibm.com (d12ml067.megacenter.de.ibm.com [9.149.164.162]) by d12av02.megacenter.de.ibm.com (8.12.11/8.12.11) with ESMTP id iB8ASvOJ016969 for ; Wed, 8 Dec 2004 11:28:57 +0100 In-Reply-To: To: "HttpClient Project" MIME-Version: 1.0 Subject: Re: Issue With HttpClient Session Handling X-Mailer: Lotus Notes Release 6.0 September 26, 2002 From: Roland Weber X-MIMETrack: S/MIME Sign by Notes Client on Roland Weber/Germany/IBM(Release 6.0|September 26, 2002) at 08.12.2004 11:27:53, Serialize by Notes Client on Roland Weber/Germany/IBM(Release 6.0|September 26, 2002) at 08.12.2004 11:27:53, Serialize complete at 08.12.2004 11:27:53, S/MIME Sign failed at 08.12.2004 11:27:53: The cryptographic key was not found, Serialize by Router on D12ML067/12/M/IBM(Release 6.51HF338 | June 21, 2004) at 08/12/2004 11:29:10, Serialize complete at 08/12/2004 11:29:10 Message-ID: Date: Wed, 8 Dec 2004 11:29:08 +0100 Content-Type: multipart/alternative; boundary="=_alternative 00397C2FC1256F64_=" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --=_alternative 00397C2FC1256F64_= Content-Type: text/plain; charset="US-ASCII" Hello Manish, could you be a little more specific about your usage of HttpClient? Are you using it as a client to connect to a server where your servlet is running? Or are you using it from a servlet to connect to a backend server? Are you having problems with the client's session kept on the server, or with a session of the server which is kept on a backend server? Your code fragment does not include the part that is most important for session handling by HttpClient: which HttpState object is used when the method is executed? That is where the cookies are stored, and many servers use cookies to track the session. If you are trying to pass headers from a backend server through your application to a client, you will also have problems with cookie domains. Assuming three machines in different domains, the server.at.the.backend will send a cookie for ".at.the.backend". If the same cookie is returned by "server.in.the.middle", clients will not accept a cookie for a domain other than ".in.the.middle". cheers, Roland "Manish Moorjani" 08.12.2004 11:11 Please respond to "HttpClient Project" To cc Subject Issue With HttpClient Session Handling Hi, I am using HttpClient for automatic login into an application by calling the Post Method. PostMethod httpMethod = new PostMethod (strRemoteURL); httpMethod.addParameter(new NameValuePair("fldUserId",strUserId)); httpMethod.addParameter(new NameValuePair("fldPassword",strPassword)); HttpConnection connConnection =httpClient.getHttpConnectionManager().getConnection(httpClient.getHostC onfiguration()); iStatusCode=httpMethod.execute(httpClient.getState(),connConnection); After the execution is successful, I use the following code to set the response headers Header[] resHead=httpMethod.getResponseHeaders(); for(int i=0;i In the test1 I have something like req.getSession(true).getAttribute(attrb1) Which is returning null !!! It works fine If I access it directly, any inputs on this ???? Regards, Manish Moorjani --=_alternative 00397C2FC1256F64_=--