留言板

Liefray MVC Portlet Signing in before submitting a form

Oussama Denden,修改在11 年前。

Liefray MVC Portlet Signing in before submitting a form

New Member 帖子: 9 加入日期: 12-12-10 最近的帖子
Hi there,
Here is my workflow,
1) A guest has a form to fill and submit
2) When submitting the form the guest will be redirected to the sign in portlet he will have to sign in or create an account
3)After signing in/creating a new account the form will be submitted

can you help me please i am doing something like this


                       LiferayPortletURL signinURL = PortletURLFactoryUtil.create(request,
					PortletKeys.LOGIN, themeDisplay.getPlid(), "RENDER_PHASE");
			signinURL.setWindowState(WindowState.MAXIMIZED);
			signinURL.setPortletMode(PortletMode.VIEW);
			signinURL.setParameter("struts_action", "/login/login");
			String currentUrl = themeDisplay.getURLCurrent();
			signinURL.setParameter("redirect", currentUrl);
			response.sendRedirect(signinURL.toString());



but i always get:
Forbidden
You do not have permission to access the requested resource.
thumbnail
Gnaniyar Zubair,修改在11 年前。

RE: Liefray MVC Portlet Singing in before submitting a form

Liferay Master 帖子: 722 加入日期: 07-12-19 最近的帖子
Hi,

MVCPortlet is singing.. emoticon i thought Liferay has new feature to sing a song from MVCPortlet.

Just kidding ... emoticon

BTW, Please set this property in your portal-ext.properties :

auth.forward.by.last.path=true


By default, it will be "false" and this above property will overwrite the value of "auth.forward.by.last.path" in portal.properties. And it will be taken you to particular page where u were before login.

- Gnaniyar Zubair
Oussama Denden,修改在11 年前。

RE: Liefray MVC Portlet Signing in before submitting a form

New Member 帖子: 9 加入日期: 12-12-10 最近的帖子
Hahaha sorry that was a typing mistake but i wasn't able to fix it the site crash every time i try to. But thank you for your quick answer unfortunately it didn't solve the problem after i sign in it take me to the page: "your signed in as...." any other suggestion please???

What i am trying to do is very classic the user will try to fill the form but when he submit we will ask him to sign in first in order to process his request. Once signed in we will process his request accordingly
Oussama Denden,修改在11 年前。

RE: Liefray MVC Portlet Signing in before submitting a form

New Member 帖子: 9 加入日期: 12-12-10 最近的帖子
Ok problem solved its due to the Authentication Token more description is available here http://www.liferay.com/community/wiki/-/wiki/Main/Authentication+Token