I would like to set to be able to set a string variable such as “DEVEL” or “PRODUCTION”, in Glassfishv3 and Apache tomcat 6 servers, and want it to be accessible from java code so I can change behaviour of my app according to the variable. What is the easiest way of doing that?
I would like to set to be able to set a string variable such
Share
For tomcat you can use
CATALINA_OPTSenvironment variable in order to set system properties:So you can setup this in IDE or just in command line:
And then in your app: