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 2009/01/01 00:44:21 UTC

[Solr Wiki] Update of "SolrJetty" by KenEllinwood

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 KenEllinwood:
http://wiki.apache.org/solr/SolrJetty

------------------------------------------------------------------------------
  
  attachment:DEMO_multiple_webapps_jetty_6.1.3.tgz
  
+ ----
+ 
+ (12/2008 KenEllinwood)  I'm using Solr-1.3.0 and Jetty 6.1.12.   Apparently the name for JNDI must have a leading slash now., eg., "solr/home" becomes "/solr/home" in the jetty config files.  I was able to get the example up and running in a stand-alone Jetty without fiddling with the "overrideDescriptor" as described above.  I'm using ContextDeployer in jetty.xml with the following context definition.  Note the 3 argument syntax for the EnvEntry -- this appears to be a new requirement in more recent versions of Jetty.  Also, I had to use an absolute path for the data directory in solrconfig.xml... not sure why.
+ 
+ {{{
+ <?xml version="1.0"  encoding="ISO-8859-1"?>
+ <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
+ 
+ <Configure class="org.mortbay.jetty.webapp.WebAppContext">
+   <Set name="contextPath">/solr</Set>
+   <Set name="war">/home/ken/search/apache-solr-1.3.0/example/webapps/solr.war</Set>
+ 
+   <Set name="extractWAR">true</Set>
+   <Set name="copyWebDir">false</Set>
+   <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
+ 
+   <Array id="plusConfig" type="java.lang.String">
+     <Item>org.mortbay.jetty.webapp.WebInfConfiguration</Item>
+     <Item>org.mortbay.jetty.plus.webapp.EnvConfiguration</Item>
+     <Item>org.mortbay.jetty.plus.webapp.Configuration</Item>
+     <Item>org.mortbay.jetty.webapp.JettyWebXmlConfiguration</Item>
+     <Item>org.mortbay.jetty.webapp.TagLibConfiguration</Item>
+   </Array>
+ 
+   <Set name="ConfigurationClasses"><Ref id="plusConfig"/></Set>
+ 
+   <New class="org.mortbay.jetty.plus.naming.EnvEntry">
+     <Arg>/solr/home</Arg>
+     <Arg type="java.lang.String">/home/ken/search/apache-solr-1.3.0/example/solr</Arg>
+     <Arg type="java.lang.Boolean">true</Arg>
+   </New>
+ 
+ </Configure>
+ }}}
+