掲示板
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!
16年前 に Roman Hoyenko によって更新されました。
RE: redirect after succesful login
Liferay Master 投稿: 878 参加年月日: 07/10/08 最新の投稿
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
16年前 に G B によって更新されました。
RE: redirect after succesful login
Regular Member 投稿: 120 参加年月日: 07/08/30 最新の投稿
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??
16年前 に Roman Hoyenko によって更新されました。
RE: redirect after succesful login
Liferay Master 投稿: 878 参加年月日: 07/10/08 最新の投稿
No, you can create a page, put wsrp portlet there. Then you assign FriendlyURL in page properties and put it into your default page.
12年前 に Ash J によって更新されました。
RE: redirect after succesful login
Junior Member 投稿: 83 参加年月日: 11/03/22 最新の投稿
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
12年前 に Ash J によって更新されました。
RE: redirect after succesful login
Junior Member 投稿: 83 参加年月日: 11/03/22 最新の投稿
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
12年前 に Firas B&D によって更新されました。
RE: redirect after succesful login
Junior Member 投稿: 43 参加年月日: 11/10/03 最新の投稿
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
12年前 に Mani kandan によって更新されました。
RE: redirect after succesful login
Expert 投稿: 492 参加年月日: 10/09/15 最新の投稿
5年前 に Mahammad Ashik A によって更新されました。
RE: redirect after succesful login
Junior Member 投稿: 77 参加年月日: 17/07/17 最新の投稿Hi,
I am not able open below link.
please help me.
Thank you..
5年前 に Mahammad Ashik A によって更新されました。
RE: redirect after succesful login
Junior Member 投稿: 77 参加年月日: 17/07/17 最新の投稿
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);
}
}