Foren

Struts Action Hook

thumbnail
Andew Jardine, geändert vor 10 Jahren.

Struts Action Hook

Liferay Legend Beiträge: 2416 Beitrittsdatum: 22.12.10 Neueste Beiträge
Hey Guys,

I am sure that whatever I am doing wrong is an easy fix but I just can seem to see what the issue is.

I have created a hook that is used to override the registration JSP and action. The JSP hook is complete with
unwanted fields removed and wanted ones added. The struts action override for /login/create_account is done as
well and in my class I have logging that is visible during registration. The issue I am having is at the end of the
process.

As a last step when the user is registered, I want to forward the user to the login action with the login/password
being passed so that my LoginAction hook is invoked and the user is authenticated. I am trying to use this --

portletURL.setParameter("saveLastPath", "0");
portletURL.setParameter("struts_action", "/login/login");

actionRequest.setAttribute( "login", ParamUtil.getString( actionRequest, "emailAddress" ) );
actionRequest.setAttribute( "password", ParamUtil.getString( actionRequest, "password1" ) );
actionRequest.setAttribute( "authType", CompanyConstants.AUTH_TYPE_EA );

System.out.println(portletURL.toString());
actionResponse.sendRedirect( portletURL.toString() );

but am having no louck. The logging in my authentication hook is not showing and there are no error messages. The user is simply being dropped
onto the public homepage with a status of "not signed in".

Any help?
thumbnail
Zsigmond Rab, geändert vor 10 Jahren.

RE: Struts Action Hook

Liferay Master Beiträge: 728 Beitrittsdatum: 05.01.10 Neueste Beiträge
Hi Andrew,

I think, this thread can help you.

Regards,
Zsigmond
thumbnail
Ahmed Hasan, geändert vor 10 Jahren.

RE: Struts Action Hook

Expert Beiträge: 306 Beitrittsdatum: 13.04.07 Neueste Beiträge
Hi Andrew,

I have a complete example of customising the registration page and the flow with the help of a set of JSP's and struts over ride.

You can refer to this link and see if this is going to be of some help to you.

Yours truly,
Ahamed Hasan
Author, Liferay Portlet Cookbook