You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Benson Margulies <bi...@gmail.com> on 2011/05/05 15:17:53 UTC

Controlling webapp startup

There are two ways to characterize what I'd like to do.

1) use the EmbeddedSolrServer to launch Solr, and subsequently enable
the HTTP GET/json servlet. I can provide the 'servlet' wiring, I just
need to be able to hand an HttpServletRequest to something and
retrieve in return the same json that would come back from the usual
Solr servlet.

2) Use the usual Solr servlet apparatus, but defer its startup until
other code in the webapp makes up its mind about configuration and
calls System.setProperty to locate the solr home and data directories.

Re: Controlling webapp startup

Posted by Chris Hostetter <ho...@fucit.org>.
: 2) Use the usual Solr servlet apparatus, but defer its startup until
: other code in the webapp makes up its mind about configuration and
: calls System.setProperty to locate the solr home and data directories.

I would suggest that route ... basically just create your own war, and 
subclass SolrDispatchFilter, do whatever configuration processing you want 
in your init(FilterConfig) method before delegating to super.init(...)


-Hoss