HttpSolrClient can accept the Apache Commons HttpClient in its constructor: https://lucene.apache.org/solr/5_3_1/solr-solrj/org/apache/solr/client/solrj/impl/HttpSolrClient.html
You can use the HttpClientBuilder (http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html), to build an HttpClient that does Basic Authentication, and then pass client to the SolrHttpClient constructor. A search on "HttpClientBuilder Basic Authentication" returned many hits, but here's one of them: http://www.baeldung.com/httpclient-4-basic-authentication Hope this helps, Dan Davis, Systems/Applications Architect (Contractor), Office of Computer and Communications Systems, National Library of Medicine, NIH -----Original Message----- From: Steven White [mailto:swhite4...@gmail.com] Sent: Tuesday, September 29, 2015 8:13 PM To: solr-user@lucene.apache.org Subject: Re: Passing Basic Auth info to HttpSolrClient Hi, Re-posting to see if anyone can help. If my question is not clear, let me know. Thanks! Steve On Mon, Sep 28, 2015 at 5:15 PM, Steven White <swhite4...@gmail.com> wrote: > Hi, > > I'm using HttpSolrClient to connect to Solr. Everything works until > when I enabled basic authentication in Jetty. My question is, how do > I pass to SolrJ the basic auth info. so that I don't get a 401 error? > > Thanks in advance > > Steve >