Foros de discusión

Show custom successful message after update password

Mahesh Narke, modificado hace 7 años.

Show custom successful message after update password

Regular Member Mensajes: 105 Fecha de incorporación: 11/10/13 Mensajes recientes
Hello
I am trying to redirect to custom message( jsp) on successfully change of password after reset password functionality.

Current code:
Liferay-hook.xml

<struts-action>
        <struts-action-path>/portal/update_password</struts-action-path>
        <struts-action-impl>com.sim.hub.action.UpdatePasswordAction</struts-action-impl>
    </struts-action>


Class :
public class UpdatePasswordAction extends BaseStrutsAction{

@Override
	public String execute(StrutsAction originalStrutsAction,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		// TODO Auto-generated method stub
		log.info("&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;++++++++++++++");
		return super.execute(originalStrutsAction, request, response);
		
	}
}


Problem i am facing :
Here i need to execute the complete updatepasswordaction first then redirect to custom jsp location instead of home page.
I am not able to do so.


Here: Is it the correct way to do this or is there another way to it.
thumbnail
Kailash Yadav, modificado hace 7 años.

RE: Show custom successful message after update password

Regular Member Mensajes: 211 Fecha de incorporación: 18/10/11 Mensajes recientes
Seems you are doing in Liferay 6.x version. You can create a JSP hook for password reset jsp and pass a referer param in request. This is a page URL where you can add some massage and login link. Liferay will redirect on this page. See here
Mahesh Narke, modificado hace 7 años.

RE: Show custom successful message after update password

Regular Member Mensajes: 105 Fecha de incorporación: 11/10/13 Mensajes recientes
Kailash Yadav:
Seems you are doing in Liferay 6.x version. You can create a JSP hook for password reset jsp and pass a referer param in request. This is a page URL where you can add some massage and login link. Liferay will redirect on this page. See here



Can i directly provide the jsp location as referer string
like custom_jsps/html/portal/update_password_message

?
Mahesh Narke, modificado hace 7 años.

RE: Show custom successful message after update password

Regular Member Mensajes: 105 Fecha de incorporación: 11/10/13 Mensajes recientes
Update_password.jsp: I tried to provide my own custom jsp file location as

if (referer.equals(themeDisplay.getPathMain() + "/portal/update_password")) {
	//referer = themeDisplay.getPathMain() + "?doAsUserId=" + themeDisplay.getDoAsUserId();
	referer="/custom_jsps/html/portal/update_password_message";
	System.out.println("callidngthe referer ++++++++++++++++++++++++++++++"+referer);
}else{
	System.out.println("Inside else part ?&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;  "+referer);
}



But it is not getting inside if part. It directly going to "group/guest/home" instead of my defined jsp
Mahesh Narke, modificado hace 7 años.

RE: Show custom successful message after update password

Regular Member Mensajes: 105 Fecha de incorporación: 11/10/13 Mensajes recientes
Anyone can please provide some input