Fórumok

Liefray MVC Portlet Signing in before submitting a form

Oussama Denden, módosítva 11 év-val korábban

Liefray MVC Portlet Signing in before submitting a form

New Member Bejegyzések: 9 Csatlakozás dátuma: 2012.12.10. Legújabb bejegyzések
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, módosítva 11 év-val korábban

RE: Liefray MVC Portlet Singing in before submitting a form

Liferay Master Bejegyzések: 722 Csatlakozás dátuma: 2007.12.19. Legújabb bejegyzések
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, módosítva 11 év-val korábban

RE: Liefray MVC Portlet Signing in before submitting a form

New Member Bejegyzések: 9 Csatlakozás dátuma: 2012.12.10. Legújabb bejegyzések
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, módosítva 11 év-val korábban

RE: Liefray MVC Portlet Signing in before submitting a form

New Member Bejegyzések: 9 Csatlakozás dátuma: 2012.12.10. Legújabb bejegyzések
Ok problem solved its due to the Authentication Token more description is available here http://www.liferay.com/community/wiki/-/wiki/Main/Authentication+Token