I want to create a common properties files which can be shared across 2 portlets in Liferay.
Or rather where can it be put so that all the portlets can access the same file.
I want to create a common properties files which can be shared across 2
Share
If you have two portlets in the same WAR then you can have a common property file for both in
WEB-INF/srcfolder of your portlet and access it usingcom.liferay.util.portlet.PortletPropsclass like:If your portlets are packaged in separate WARs then you have to place the property in
portal-ext.propertiesand access the property usingcom.liferay.portal.util.PropsUtil.get("propertyName").