We are in the middle of defining a new development workflow, because we ar migrating to Ebase V5.0.
In the current (V4) settup, we have 3 servers (development/staging/production). We have 1 global script with environment specific settings (urls/passwords/filsystempaths etc). The correct settings are selected based on the system name. This has worked ok for us.
On V5 we want to use the 'local designer' for each developer. This means, we need settings that may differ between specific developers. Because I think it is bad practice to have these settings in source control I thought using a 'Java properties file on the server' would be a nice solution to this.
Something like this:
Code: Select all
var fileName= 'C:\\david\test.properties';
var properties = new java.util.Properties();
properties.load(new java.io.StringReader(FileServices.readFile(fileName)));
const debug = properties.getProperty('debug');
Code: Select all
debug=true
Code: Select all
if(system.systemName=='David'){
fileName='C:\\david\\test.properties';
}
In a servlet you can do something like this to find the location of WEB-INF/classes:
Code: Select all
String path=servletConfig.getServletContext().getRealPath("/WEB-INF/classes");
Or am I missing a better way to do this?
Regards,
David