NOTE: Setting Java property in Eclipse ONLY needs to be done if your organization is developing custom Java or Web code. If you are using just standard WOW. Skip to the section below.
Setting the environment in the Java system properties in Eclipse
The system property named "wow.env.mode" can have its value set to "DEV", "PROD", or "TEST" in order to set the
environment of the WOW instance. The steps for setting an environment variable in Eclipse are as follows:
In the J2EE perspective, go to the Server tab and double-click on the Tomcat Server
On the server overview page, click the “Open launch configuration” link
On the Environment tab, you can add an environment variable
As of version 7.1.1, WOW supports the addition of a prefix for environment configurations. To set up a prefix, go through the same steps outlined above to set a wow.env.mode, but use the variable name wow.env.prefix. This variable is used to determine which wow.properties file to use if there are multiple files on the server. For instance, if our wow.env.mode was set to PROD and our wow.env.prefix was set to WOW72, Tomcat would use the WOW72_PROD_wow.properties file found in the wowconf folder inside the WEB-INF folder of the WOW webapp.
Note: Cannot set the environment in the properties file.
Setting the environment in Tomcat configuration files
Many times you will not have Eclipse set up and running to manage your environment. Tomcat can also be used in this case. We set up environment properties inside the context.xml file. This file can be found in the conf folder of the Tomcat installation. If the file is not found in the base folder, it may be split out between the webapps you have set up on your Tomcat server. In this case it will be inside the Catalina folder.
Once you find the context.xml file, edit it and add the following line(s) to the file:
<Environment name="wow.env.mode" value="PROD" type="java.lang.String"/>
<Environment name="wow.env.prefix" value="ext" type="java.lang.String"/>
Replace the "PROD" and/or "ext" value(s) with the value(s) your application requires.
We will then need to restart the Tomcat server to pick up our changes. If set up properly, WOW will now use the ext_PROD_wow.properties file (based on the above example) and load in all properties from that file when WOW starts.