On 25/08/11 12:15 AM, Christopher Schultz wrote:

So, if you could do this with code it would be:

   getServletContext().getRealPath("/WEB-INF/classes/solr")

Right?

Yes.


There isn't any system property for this kind of thing (since system
properties are JVM-wide, and not specific to any particular webapp) so
it would have to be, as you say, some kind of "magic" variable that
you could use.

Are all properties JVM-wide? If I define a property in:

  webapps/someapp##1234/META-INF/context.xml

Then that property is available to all applications? I didn't know that. If 
that's the case, then this approach will never work.

I don't believe such a variable exists. Since Solr is servlet
context-aware application (i.e. it *is* webapp), is it possible to
give it a path relative to the webapp itself? You might want to ask
the Solr folks about this.

Sure. I can try there next, but any such solution is going to involve changing 
Solr code.

Another option, which I think is a better option, would be to locate
solr/home outside of your deployment directory.

That is an option, but a very awkward one since then I have an application 
separated from the configuration which is an integral part of its 
functionality. This isn't some JDBC connection which differs in every 
deployment, but the configuration of exactly how the application works. So 
being able to keep it in our SCM with the code and deploy together is essential.

Thanks

Ari


--
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to