-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aristedes,

On 8/24/2011 6:12 AM, Aristedes Maniatis wrote:
> I have another parallel deployment question: I am deploying Solr
> within a custom war application and it requires a path to its
> config files. Before parallel deployment I had this entry in
> context.xml:
> 
> <Environment name="solr/home" 
> value="${ROOTDIR}/app/A1/webapps/search-internal/WEB-INF/classes/solr"
>
> 
type="java.lang.String" override="false"/>
> 
> But now, I cannot predict the name of the application path (since
> it looks like this "search-internal##11081701"). I have also been 
> unsucessful in putting this environment entry inside the
> application itself and using a relative path, since it appears to
> be relative to tomcat and not to the application.
> 
> Is there some magic like a ${APP_ROOT} variable I can use?

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

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

Right?

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.

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.

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

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5VB4EACgkQ9CaO5/Lv0PAr9QCdEGNstlZyka9uWD+ZS65tvBpz
+7wAnRjJV49BQck00kNr9UyI2l13+ty1
=ilmU
-----END PGP SIGNATURE-----

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

Reply via email to