- All Implemented Interfaces:
- EventListener, javax.servlet.ServletContextListener
public class ConfigurationPropertiesSetup
extends Object
implements javax.servlet.ServletContextListener
Locates the runtime configuration properties and stores them in the servlet
context.
This must be invoked before any listener that requires configuration
properties.
The properties are determined from a file called 'build.properties' in the
resources directory of the webapp, and a file called 'runtime.properties' in
the Vitro home directory. In case of conflict, runtime.properties wins.
The path to the Vitro home directory can be specifed by an JNDI value, or by
a System property, or by a property in build.properties, in that order. If
the Vitro home directory is specified in more than one way, a warning is
issued and the first value is used.
The value that was determined for 'vitro.home' is also included in the
ConfigurationProperties bean.
If build.properties or runtime.properties cannot be located or loaded, a
fatal error is registered to abort the startup.