Fórum

Replacing Core Portal-Impl classes through Ext

Himanshu Prasad, modificado 9 Anos atrás.

Replacing Core Portal-Impl classes through Ext

New Member Postagens: 3 Data de Entrada: 12/05/14 Postagens Recentes
Hi All,

I am using Liferay 6.2 CE and I am trying to replace a portal-impl class "LoginAction.java" through Liferay Ext by first renaming it to "MyLoginAction.java" and then extending it in "LoginAction.java" class.
I have put some System.out.println statements in the extended class but when I redeploy and restart the server nothing is being printed on the console.
Can anyone say what I must do..?

Thanks
Himanshu
thumbnail
Philipp Schwarz, modificado 9 Anos atrás.

RE: Replacing Core Portal-Impl classes through Ext

Junior Member Postagens: 29 Data de Entrada: 19/10/12 Postagens Recentes
Hi,

I'd suggest you take a look at the documentation of overriding and adding struts actions.

If this doesn't meet your requirements and you have to use an extension, be sure to wire your actions correctly in the relevant *-struts.xml files.

Kind regards,
Phil
thumbnail
Amos Fong, modificado 9 Anos atrás.

RE: Replacing Core Portal-Impl classes through Ext

Liferay Legend Postagens: 2047 Data de Entrada: 07/10/08 Postagens Recentes
I don't think this is related to struts actions. It's probably because you renamed the classname. This portal property runs loginPostAction classes based on classname

    #
    # Login event
    #
    login.events.pre=com.liferay.portal.events.LoginPreAction
    login.events.post=com.liferay.portal.events.ChannelLoginPostAction,com.liferay.portal.events.DefaultLandingPageAction,com.liferay.portal.events.LoginPostAction
Himanshu Prasad, modificado 9 Anos atrás.

RE: Replacing Core Portal-Impl classes through Ext

New Member Postagens: 3 Data de Entrada: 12/05/14 Postagens Recentes
Hi All,

Using Liferay Ext I tried to override the processAction method of "ForgotPasswordAction.java" class of Portal-Impl library by first renaming this class to "MyForgotPasswordAction.java" and then extending it in my "ForgotPasswordAction.java" but still the changes are not reflecting.

can anyone help me out in this situation...

Thanks
Himanshu