Wanted to add some more details to my problem.  I have many jars that have 
their 
own config files.  So I'd have to copy files for every jar.  Can solr read from 
the classpath (jar files)?

Yes my war is always deployed to the same location under webapps.  I do already 
have solr/home defined in web.xml.  I'll try copying my files into there, but I 
would have to extract every jar file and do this manually.




________________________________
From: "Wilkes, Chris" <cwil...@gmail.com>
To: solr-user@lucene.apache.org
Sent: Wed, February 9, 2011 3:44:03 PM
Subject: Re: solr current workding directory or reading config files

Is your war always deployed the the same location, ie 
"/usr/mycomp/myapplication/webapps/myapp.war"?  If so then on startup copy the 
files out of your directory and put them under CATALINA_BASE/solr 
(usr/mycomp/myapplication/solr) and in your war file have the 
META-INF/context.xml JNDI setting point to that.

<Context>
  <Environment name="solr/home" type="java.lang.String" 
value="/usr/mycomp/myapplication/solr" override="true" />
</Context>

If you know of a way to reference CATALINA_BASE in the context.xml that would 
make it easier.

On Feb 9, 2011, at 12:00 PM, Tri Nguyen wrote:

> Hi,
> 
> I have a class (in a jar) that reads from properties (text) files.  I have 
>these
> files in the same jar file as the class.
> 
> However, when my class reads those properties files, those files cannot be 
>found
> since solr reads from tomcat's bin directory.
> 
> I don't really want to put the config files in tomcat's bin directory.
> 
> How do I reconcile this?
> 
> Tri

Reply via email to