Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
redirect after succesful login
I need help: I followed the instructions on http://wiki.liferay.com/index.php/Custom_redirect_after_login to redirect to another page after succesful login, but it doesn't work. Can you give me a working example to redirect after successful login to e.g. the wsrp portlet, what do I have to do to approve this!
Look here:
http://wiki.liferay.com/index.php/Customizing_the_default_page_after_login
default.landing.page.path=/web/guest/home
http://wiki.liferay.com/index.php/Customizing_the_default_page_after_login
default.landing.page.path=/web/guest/home
Thanks, I know this page, but how do I get for example to the wsrp portlet? Please can you give me an example, how it works!
Do I have to write: default.landing.page.path=/c/portal/wsrp??
Do I have to write: default.landing.page.path=/c/portal/wsrp??
No, you can create a page, put wsrp portlet there. Then you assign FriendlyURL in page properties and put it into your default page.
Hi,
Thanks for the information, but it does not work for me.
I'm trying to forward to a page after logging in, and I have specified the line
"default.landing.page.path=/web/guest/dashboard"
in my portal-ext.properties file. But, still it does not get redirected to the page. After logging in also, it remains in the welcome page.
Please help.
Thanks,
-ash
Thanks for the information, but it does not work for me.
I'm trying to forward to a page after logging in, and I have specified the line
"default.landing.page.path=/web/guest/dashboard"
in my portal-ext.properties file. But, still it does not get redirected to the page. After logging in also, it remains in the welcome page.
Please help.
Thanks,
-ash
Hi,
I solved the problem myself by setting it in the below page
Portal -> Settings -> General -> Navigation
Thanks,
-ash
I solved the problem myself by setting it in the below page
Portal -> Settings -> General -> Navigation
Thanks,
-ash
Hey do u can please explain to me how to do that, I want after logging successefully, that the user logged be redirected to his private page home. How to do that? Any help
Hi,
I am not able open below link.
please help me.
Thank you..
create a new componenet class. Then add below the codes.. Its working fine for me.
import javax.servlet.http.HttpSession;
import org.osgi.service.component.annotations.Component;
import com.liferay.portal.kernel.events.ActionException;
import com.liferay.portal.kernel.events.LifecycleAction;
import com.liferay.portal.kernel.events.LifecycleEvent;
import com.liferay.portal.kernel.struts.LastPath;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.WebKeys;
@Component(
immediate = true,
property = { "key=login.events.post" },
service = LifecycleAction.class
)
public class PreLogin implements LifecycleAction {
public void processLifecycleEvent(LifecycleEvent lifecycleEvent) throws ActionException {
final HttpSession session = lifecycleEvent.getRequest().getSession();
String path="/web/guest/<page-name>";
LastPath lastpath=new LastPath(StringPool.BLANK, path);
session.setAttribute(WebKeys.LAST_PATH, lastpath);
}
}
import javax.servlet.http.HttpSession;
import org.osgi.service.component.annotations.Component;
import com.liferay.portal.kernel.events.ActionException;
import com.liferay.portal.kernel.events.LifecycleAction;
import com.liferay.portal.kernel.events.LifecycleEvent;
import com.liferay.portal.kernel.struts.LastPath;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.WebKeys;
@Component(
immediate = true,
property = { "key=login.events.post" },
service = LifecycleAction.class
)
public class PreLogin implements LifecycleAction {
public void processLifecycleEvent(LifecycleEvent lifecycleEvent) throws ActionException {
final HttpSession session = lifecycleEvent.getRequest().getSession();
String path="/web/guest/<page-name>";
LastPath lastpath=new LastPath(StringPool.BLANK, path);
session.setAttribute(WebKeys.LAST_PATH, lastpath);
}
}
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™