I found that the JNDI settings for Tomcat6 were hard to figure out. Would someone be willing to write it up for the wiki? Since I think most people getting started with SOLR will be using Tomcat6 (or Jetty), it would make sense to update the docs a bit to make it easier to figure out the proper place and way to set all this up.

Even just a link to this thread in some archive would help.

--Matthew

On Dec 5, 2007, at 1:57 AM, Erik Hatcher wrote:

Or, instead of messing around with the JNDI setting, simply set - Dsolr.solr.home=/opt/solr.... with the JVM startup parameters for Tomcat. Hardcoding a path in web.xml is definitely _not_ what we want to do. Not all containers unpack the WAR file onto disk. Also, consider the case of upgrading to a newer version of Solr after having tweaked web.xml.

        Erik


On Dec 4, 2007, at 9:58 PM, Yousef Ourabi wrote:

Tomcat unpacks the jar into the webapps directory based off the context name anyway...

What was the original thinking behind not having solr/home set in the web.xml -- seems like an easier way to deal with this.

I would imagine most people are more familiar with setting params in web.xml than manually creating Contexts for their webapp...

In fact I would take a step further and have a default value of / opt/solr (or whatever...) and if a specific user wants to change it they can just edit their web.xml?

This would simplify the documentation, instead of configure your stuff in the Context -- it becomes "this is the default", copy example/solr to /opt/solr (or we have a script do it) and deploy the .war


----- Original Message -----
From: "Chris Hostetter" <[EMAIL PROTECTED]>
To: solr-user@lucene.apache.org
Sent: Tuesday, December 4, 2007 6:34:55 PM (GMT-0800) America/ Los_Angeles
Subject: Re: Tomcat6 env-entry


: It works excellently in Tomcat 6. The toughest thing I had to deal with is : discovering that the environment variable in web.xml for solr/ home is
: essential. If you skip that step, it won't come up.

no, there's no reason why you should need to edit the web.xml file ... the
solr/home property can be set in a <Context> configuration using an
<Environment> directive without ever opening the solr.war.  See this
section of the tomcat docs for me details...

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Environment%20Entries

:    <env-entry>
:        <env-entry-name>solr/home</env-entry-name>
:        <env-entry-type>java.lang.String</env-entry-type>
: <env-entry-value>F:\Tomcat-6.0.14\webapps\solr</env-entry- value>
:    </env-entry>


-Hoss



Reply via email to