tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David kerber <dcker...@verizon.net>
Subject Re: Command line parameters inside webapps ?
Date Wed, 02 Apr 2008 15:36:19 GMT
Yes.  You can use System.getProperty( "myPropertyName", "defaultValue" ) 
to retrieve system parameters set on startup with 
-DmyPropertyName="myPropertyValue"


Maxim Veksler wrote:
> Hello everyone,
>
> Can I read from my webapp a command line parameters passed to tomcat
> when it's loaded ?
> Something of the "-Dsomeparameter=somevalue", alternatively can I get
> access to environment variables passed to tomcat on it's
> initialization from my webapp ?
>
> What I'm trying to do is allow simple switch that can be passed to my
> webapp that would instruct it whether it is running passive or active.
>
>
>
> I've been googling for this and couldn't find any references to this.
>
>
> Thank you,
> Maxim.
>
>   



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message