As opposed to only using environment variables, user home directories, or current working directories.
- Some containers (e.g., Tomcat) allow context descriptors to be passed as a separate file
including, to my understanding, setting properties
In some situations, e.g., Debian packaging, we are not allowed to simply arbitrarily change the owner of /usr/share/tomcat6 as is done here:
The trunk patch was tested on jetty container using both the added section in web.xml commented out (in which default
behavior ensues, at least on my system - in any case null is passed by getInitParameter), and with the section un-commented (in which the /tmp/ folder becomes used as shown by console output from mvn jetty:run
WARN - OpenmrsUtil.getRuntimeProperties(2459) |2010-10-03 21:41:05,474| Unable to find properties file: /tmp/openmrs-runtime.properties
WARN - OpenmrsUtil.getRuntimeProperties(2473) |2010-10-03 21:41:05,477| Also unable to find a runtime properties file at /home/misha/workspace/trunk/webapp/openmrs-runtime.properties
WARN - OpenmrsUtil.getRuntimeProperties(2495) |2010-10-03 21:41:05,478| Unable to find a runtime properties file. Initial setup is needed. View the webapp to run the setup wizard.
patch-1.6.x.patch (for http://svn.openmrs.org/openmrs/branches/1.6.x) was tested as applied to a particular version (1.6.1) with the web.xml commented out and the following file placed in /etc/tomcat6/Catalina/localhost/openmrs.xml :
<Parameter name="application.data.directory" value="/tmp"
with the section commented and uncommented, the difference is picked up correctly in the openmrs setup wizard.
patch-1.7.x.patch (for http://svn.openmrs.org/openmrs/branches/1.7.x) is currently untested , but due to similarity to the other two is expected to work similarly.