Return-Path: Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: (qmail 6955 invoked from network); 15 Mar 2009 07:22:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Mar 2009 07:22:37 -0000 Received: (qmail 70733 invoked by uid 500); 15 Mar 2009 07:22:33 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 70704 invoked by uid 500); 15 Mar 2009 07:22:33 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 70693 invoked by uid 99); 15 Mar 2009 07:22:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Mar 2009 00:22:33 -0700 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of shalinmangar@gmail.com designates 209.85.198.226 as permitted sender) Received: from [209.85.198.226] (HELO rv-out-0506.google.com) (209.85.198.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Mar 2009 07:22:25 +0000 Received: by rv-out-0506.google.com with SMTP id k40so2782791rvb.5 for ; Sun, 15 Mar 2009 00:22:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=FLV7Wujo4vCQZKEnYiAsOB8xOCiv76MjlBxTKaXby3o=; b=X1eP6KKSjJWIzTjJNGvF0FFjovdpQjhJdVRwqovPOI54ftguuF8zx3T15Xw9mBLQN4 1ehWJNYbAa+XnLcV/sJ55iZZYoQHueiiNy0AoEY4mVh+pd3VSe++q+RbiwgNEl+IpTjF YWEDaYivREUaxE05agt80djmZl20uMsGNPB04= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=M21/yTesgVm99APHU+e0OQuMAHYZD6BlklsnoZN8Ji36hGryDnQ15zZVHq/BsidlNO DzLnO6u9k4ttSMkUMvop65OEyWhwuUFvv0664ecchGdKV+NApXkO7Hvi2Xc5mTBAF5Yr KOHM4VB8u69AXE7OCHnOaIBgy3iqefYwuG6rs= MIME-Version: 1.0 Received: by 10.142.172.20 with SMTP id u20mr353741wfe.228.1237101724245; Sun, 15 Mar 2009 00:22:04 -0700 (PDT) In-Reply-To: <4DCBAA39733E8048992FB77371260419143917B1@gsmbnbp23es.firmwide.corp.gs.com> References: <4DCBAA39733E8048992FB77371260419143917B1@gsmbnbp23es.firmwide.corp.gs.com> Date: Sun, 15 Mar 2009 12:52:04 +0530 Message-ID: <69de18140903150022h3d99d8cwd6c9178ffafa99c2@mail.gmail.com> Subject: Re: Adding authentication Token to the CommonsHttpSolrServer From: Shalin Shekhar Mangar To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=000e0cd2e084d3210804652330c1 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd2e084d3210804652330c1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Fri, Mar 13, 2009 at 12:03 AM, Narayanan, Karthikeyan < Karthikeyan.Narayanan@gs.com> wrote: > Hi, > We have installed the Solr in Tomcat server and enabled the > security constraint at the Tomcat level.. We require to pass the > authentication token(cookie) to the search call that is made using > CommonsHttpSolrServer. Would like to know how can I add the token to > the CommonsHttpSolrServer. Appreciate any idea on this. > I took a look at commons-httpclient javadocs. This should work: Create an instance of HttpState and use the HttpState#addCookie to add your auth cookie. Then you can create an instance of HttpClient and use HttpClient#setState method to pass the HttpState object. Finally pass this HttpClient object to the constructor of CommonsHttpSolrServer. -- Regards, Shalin Shekhar Mangar. --000e0cd2e084d3210804652330c1--