You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2007/07/31 22:56:13 UTC

[Solr Wiki] Update of "SolrJetty" by MattKangas

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The following page has been changed by MattKangas:
http://wiki.apache.org/solr/SolrJetty

------------------------------------------------------------------------------
  
  Where the variable for '''solr/home''' points to a directory containing a '''conf''' directory that in turn has a '''solrconfig.xml''' file.
  
+ ----
+ 
+ (7/2007 MattKangas) The recipe above didn't work for me with Jetty 6.1.3. Specifying "solr/home" via "`<New class="...EnvEntry">`" sets a GLOBAL value which gets evaluated after the full configuration is read, so the last setting wins.
+ 
+ Fortunately, I've found a solution that works well:
+  * Specify "`ContextDeployer`" in `jetty.xml`
+  * For each web app, add a `.xml` file in "`./contexts`"
+    * Set `ConfigurationClasses` to activate JNDI. (AFAIK, must be done separately for each webapp)
+    * Set `overrideDescriptor`, pointing to a .xml file
+    * In the `overrideDescriptor` file, set an `<env-entry>` for "`solr/home`"
+ 
+ The "`overrideDescriptor`" settings will be applied AFTER it has been configured by the default descriptor
+ and the WEB-INF/web.xml descriptor.
+ 
+ I'm glossing over a lot of details, natch, so I am attaching a tarball with a known-good configuration that runs two Solr instances inside one Jetty container. I'm using Solr 1.2.0 and Jetty 6.1.3 respectively.
+ 
+ FIXME-add-file
+