liferay-6.2

Instance specific properties file in liferay


I have created 3 portal instances lets say a, b and c and also created their properties files portal-a.properties , portal-b.properties and portal-c.properties respectively. But I am not able to use these properties file in respective of instance. Everytime I use "propsUtil.getProperty", I get the property from portal-ext properties file. I also tried override property but then it is only taking that properties file which is loaded last in sequence at time of server is started. Whereas I want to take the property from that particular instance properties file. For example, if I logged in from instance "a" then property should call from a.properties file. Please help


Solution

  • a, b and c need to correspond to the web-ids of the instances. Further, you'll need to define a system property, e.g. by starting Tomcat with added -Dcompany-id-properties=true to your CATALINA_OPTS.

    When you've done that, note that (by far) not all properties are at your disposition. Some will work, some won't. If your problems persist, you might try the ones that can't be overridden.