Foren

Re: portlet.properties vs Portal.properties

venka reddy, geändert vor 11 Jahren.

Re: portlet.properties vs Portal.properties

Regular Member Beiträge: 231 Beitrittsdatum: 23.03.11 Neueste Beiträge
Hi,

I am developing a MVC plugin .

Can i know what is the difference between Portlet.properties and Portal.properties?

what properties i can specify in Portal.properties and what properties are not?
thumbnail
Juhi Kumari, geändert vor 11 Jahren.

RE: Re: portlet.properties vs Portal.properties

Expert Beiträge: 347 Beitrittsdatum: 12.12.11 Neueste Beiträge
Hi Venka,
portlet.properties belong to a particular portlet while portal.properties are common for all portlets.
Each and every portlet has own portlet.properties.
See this link to know all properties.

Regards
Juhi
venka reddy, geändert vor 11 Jahren.

RE: Re: portlet.properties vs Portal.properties

Regular Member Beiträge: 231 Beitrittsdatum: 23.03.11 Neueste Beiträge
Hi Kumari,

Thanks for reply,

I have gone through the link you have provided.

I have a few queries.
So, Can we define the database credentials in Portal.properties of Plugin Portlet.(like jdbc.default.url , jdbc.default.driverClassName etc..)

If so, whether it will override the Portal-ext.properties in Root/WEB-INF/Classes folder?
thumbnail
Juhi Kumari, geändert vor 11 Jahren.

RE: Re: portlet.properties vs Portal.properties

Expert Beiträge: 347 Beitrittsdatum: 12.12.11 Neueste Beiträge
Hi Venka,
You have to define database credential in portal-ext.properties file only.

Regards
Juhi
venka reddy, geändert vor 11 Jahren.

RE: Re: portlet.properties vs Portal.properties

Regular Member Beiträge: 231 Beitrittsdatum: 23.03.11 Neueste Beiträge
Hi Juhi,

So we cannot define in Portal-ext.properties? and for every plugin portlet there is Portal.properties file.

I have seen portal.properties is present in KnowledgeBase portlet.
thumbnail
Juhi Kumari, geändert vor 11 Jahren.

RE: Re: portlet.properties vs Portal.properties

Expert Beiträge: 347 Beitrittsdatum: 12.12.11 Neueste Beiträge
Hi,
You have to define in portal-ext.properties file only. Using portal-ext.properties file you can overwrite the default
liferay properties. there is only one portal-ext.properties file for all portlets.
You will find under tomcat\webapps\ROOT\WEB-INF\classes.

Regards
Juhi
venka reddy, geändert vor 11 Jahren.

RE: Re: portlet.properties vs Portal.properties

Regular Member Beiträge: 231 Beitrittsdatum: 23.03.11 Neueste Beiträge
Hi,

In KnowledgeBase portlet there is portal.properties file in below path

knowledge-base-portlet\WEB-INF\classes

what is the use of that file?
thumbnail
Amit Doshi, geändert vor 11 Jahren.

RE: Re: portlet.properties vs Portal.properties

Liferay Master Beiträge: 550 Beitrittsdatum: 29.12.10 Neueste Beiträge
venka reddy:
Hi,

In KnowledgeBase portlet there is portal.properties file in below path

knowledge-base-portlet\WEB-INF\classes

what is the use of that file?


Because it is a separate portlet ( it was not provided with in liferay portal source) and it wanted to use some of the properties of the portal level. So to make it an seperate entity they have put that property in the portlet itself.

I have not checked that portlet but according to my knowledge in the KnowledgeBase Portlet , they will be using all the properties of Portal level only not anything different.

Let me know if you need more details.

Thanks & Regards,
Amit Doshi
venka reddy, geändert vor 11 Jahren.

RE: Re: portlet.properties vs Portal.properties

Regular Member Beiträge: 231 Beitrittsdatum: 23.03.11 Neueste Beiträge
hi Amit,

Thanks for reply,

As per my understand Plugin can override the all portal level properties to do some operations for plugin at Portal Level. Is it right?
thumbnail
Amit Doshi, geändert vor 11 Jahren.

RE: Re: portlet.properties vs Portal.properties

Liferay Master Beiträge: 550 Beitrittsdatum: 29.12.10 Neueste Beiträge
venka reddy:
hi Amit,

Thanks for reply,

As per my understand Plugin can override the all portal level properties to do some operations for plugin at Portal Level. Is it right?



In order to modify any Portal.properties other than Portal-ext.properties, we have to made an hook in the portlet. You can check in Knowledge Base portlet also. They have define liferay-hook.xml and in that they have specified the entry of portal properties.

So we can modify only that Portal properties that we can modify with the help of Hook .

Hope I am clear.

Thanks & Regards,
Amit Doshi
thumbnail
Amit Doshi, geändert vor 11 Jahren.

RE: Re: portlet.properties vs Portal.properties

Liferay Master Beiträge: 550 Beitrittsdatum: 29.12.10 Neueste Beiträge
More to add on my own comments.
List of the Portal properties that we can modify with the help of hooks.

http://www.liferay.com/community/wiki/-/wiki/Main/Hook+DTD+-+6.0

Thanks & Regards,
Amit Doshi