ontashkal
ontashkal

Reputation: 192

How to get default page url in liferay?

I set default page URL in portal-ext.properties.

default.landing.page.path=/group/guest/home

Then create portlet with Controller :

public class UserPortrait extends MVCPortlet {


@Override
public void render(RenderRequest renderRequest, RenderResponse renderResponse) {

}

@Override
public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException, PortletException {

    super.processAction(actionRequest, actionResponse);
}

}

Now , how to get landing page URL in processAction method.

Upvotes: 1

Views: 2005

Answers (1)

Pankaj Kathiriya
Pankaj Kathiriya

Reputation: 4210

Simply, use com.liferay.portal.kernel.util.PropsUtil.get(String propertyName) to get any property from portal-ext.properties file.

Upvotes: 5

Related Questions