Gajjini
Gajjini

Reputation: 283

Couldn't able to show default landing page from Portlet Action class

I am using Liferay 6 Portal for develoment . I have created a page (Be it any page Public or private page ) , and added some of my developed Custom Portlets to it and i defined this page as a default landing page .

Now inside my GenericPortlet class , once the users validates his username and password with our database , i want to redirect him to my landing page .

I have tried a lot used Portlets RequestDispatcher's forward , include also , with the combinations of absolute and relative path to my default landing page . And also tried my luck with using ActionResponse from processAction Method .

But neither thing has worked , could anybody please tell me how to resolve this issue ??

If anyone knows please help me how to resolve this issue .

Thanks you very much for reading .

Upvotes: 0

Views: 151

Answers (1)

Mark
Mark

Reputation: 18877

put redirection in portlet processAction method:

@Override
public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException, PortletException {
    //defaultLandingPage = ...
    actionResponse.sendRedirect(defaultLandingPage);
};

Upvotes: 2

Related Questions