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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to