aspose file tools*
The moose likes JForum and the fly likes Environment variables and JForum configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Environment variables and JForum configuration" Watch "Environment variables and JForum configuration" New topic
Author

Environment variables and JForum configuration

robert crowther
Ranch Hand

Joined: Oct 19, 2013
Posts: 41
    
  10
Is there any way environment variables can be used to modify JForum properties files? I've tried several variations, found this Stackoverflow post,

http://stackoverflow.com/questions/2263929/regarding-application-properties-file-and-environment-variable

but got no return from properties equipped with expanded environment variables bar 'null'.

This would be useful, as it is near impossible to match my local against the deployed config.
robert crowther
Ranch Hand

Joined: Oct 19, 2013
Posts: 41
    
  10
My conclusion:

Environment variables do not seem to work within property files. However JForum cleanly abstracts it's configuration into a handful of files. If parallel installations of the application are not wanted, duplicate the config files, one for each stage, e.g. development, testing, deployment. In most circumstances,

SystemGlobals.properties

and the appropriate db config,

config > database > {mydatabase} > {mydatabase}.properties

are the only two which will need duplicating.
robert crowther
Ranch Hand

Joined: Oct 19, 2013
Posts: 41
    
  10
There is much information on this in a later post - if setup configuration is of interest, please see here,
http://www.coderanch.com/t/627867/jforum/Setting-custom-configuration-variables-JForum
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Environment variables and JForum configuration