Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
venka reddy
Re: portlet.properties vs Portal.properties
December 24, 2012 1:52 AM
Answer

venka reddy

Rank: Regular Member

Posts: 231

Join Date: March 23, 2011

Recent Posts

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?
Juhi Kumari
RE: Re: portlet.properties vs Portal.properties
December 24, 2012 3:00 AM
Answer

Juhi Kumari

Rank: Expert

Posts: 347

Join Date: December 12, 2011

Recent Posts

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
RE: Re: portlet.properties vs Portal.properties
December 24, 2012 3:20 AM
Answer

venka reddy

Rank: Regular Member

Posts: 231

Join Date: March 23, 2011

Recent Posts

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?
Juhi Kumari
RE: Re: portlet.properties vs Portal.properties
December 24, 2012 3:48 AM
Answer

Juhi Kumari

Rank: Expert

Posts: 347

Join Date: December 12, 2011

Recent Posts

Hi Venka,
You have to define database credential in portal-ext.properties file only.

Regards
Juhi
venka reddy
RE: Re: portlet.properties vs Portal.properties
December 24, 2012 3:44 AM
Answer

venka reddy

Rank: Regular Member

Posts: 231

Join Date: March 23, 2011

Recent Posts

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.
Juhi Kumari
RE: Re: portlet.properties vs Portal.properties
December 24, 2012 3:53 AM
Answer

Juhi Kumari

Rank: Expert

Posts: 347

Join Date: December 12, 2011

Recent Posts

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
RE: Re: portlet.properties vs Portal.properties
December 24, 2012 4:00 AM
Answer

venka reddy

Rank: Regular Member

Posts: 231

Join Date: March 23, 2011

Recent Posts

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?
Amit Doshi
RE: Re: portlet.properties vs Portal.properties
December 26, 2012 4:20 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

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
RE: Re: portlet.properties vs Portal.properties
December 26, 2012 5:32 AM
Answer

venka reddy

Rank: Regular Member

Posts: 231

Join Date: March 23, 2011

Recent Posts

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?
Amit Doshi
RE: Re: portlet.properties vs Portal.properties
December 27, 2012 4:47 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

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
Amit Doshi
RE: Re: portlet.properties vs Portal.properties
December 27, 2012 4:52 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

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