On Tue, Aug 18, 2009 at 10:18 PM, Ramirez, Paul M (388J) < paul.m.rami...@jpl.nasa.gov> wrote:
> Hi All, > > The project I am working on is using Solr and OpenSSO (Sun's single sign on > service). I need to write some sample code for our users that shows them how > to query Solr and I would just like to point them to the SolrJ documentation > but I can't see an easy way to be able to pass a cookie with the request. > The cookie is needed to be able to get through the SSO layer but will just > be ignored by Solr. I see that you are using Apache Commons Http Client and > with that I would be able to write the cookie if I had access to the > HttpMethod being used (GetMethod or PostMethod). However, I can not find an > easy way to get access to this with SolrJ and thought I would ask before > rewriting a simple example using only an ApacheHttpClient without the SolJ > library. Thanks in advance for any pointers you may have. > There's no easy way I think. You can extend CommonsHttpSolrServer and override the request method. Copy/paste the code from CommonsHttpSolrServer#request and make the changes. It is not an elegant way but it will work. -- Regards, Shalin Shekhar Mangar.