tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Will Hartung" <>
Subject Re: Configuring System properties
Date Fri, 07 Feb 2003 17:28:49 GMT
> From: "Shapira, Yoav" <>
> Sent: Friday, February 07, 2003 6:02 AM
> Subject: RE: Configuring System properties

> Howdy,
> If you want to go the same route, simply add -Dsearcher.home=... to the
> JAVA_OPTS variable in $CATALINA_HOME/bin/  It will be
> available via System.getProperty("searcher.home") just like when you
> launch a command-line application.

Perfectly valid and reasonable solution, though it requires folks using your
app to tweak the startup command (most containers allow this).

Another option is to simply set the property yourself in a startup servlet
using System.setProperty(). Then, you can configure it in your web.xml using
a configuration option or a JNDI entry.

This does bring up a simple question:

Do all of the webapps see the same System Properties? I can't imagine why
not (assuming they share a JVM), but with all  of the isolation that's
enforced between the webapps, it gives one pause to consider.


Will Hartung

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message