Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
L P Bharat
How to create JSF based login portlet
November 18, 2008 3:03 AM
Answer

L P Bharat

Rank: Junior Member

Posts: 39

Join Date: August 20, 2008

Recent Posts

Hi,

I have to migrate an existing JSF based application to liferay.
For this I have to use the existing login logic which is available with the existing application.

Can anyone suggest me how to create login portlet in JSF which has all the features of liferay login portlet and how can I call the login logic of my existing application from that portlet.
Alex Wallace
RE: How to create JSF based login portlet
November 18, 2008 7:10 AM
Answer

Alex Wallace

Rank: Liferay Master

Posts: 640

Join Date: November 4, 2007

Recent Posts

We did something similar. By looking at the struts actions used by current login portlet and reusing the desired code.

An alternative would be to create your own AutoLogin class and make your portlet send it request params.

Of all these pieces of code there are examples in portal source.

It is definitely possible.
L P Bharat
RE: How to create JSF based login portlet
November 18, 2008 10:41 AM
Answer

L P Bharat

Rank: Junior Member

Posts: 39

Join Date: August 20, 2008

Recent Posts

Thanks Alex,

Can you describe it a bit more?
If possible please provide some code snippet.


In my existing application I have one managed bean (say "authenticationBean") having method loginAction() .
This method is called from the commandButton on the view with the following code

<h:commandButton action="#{authenticationBean.loginAction}" />

Please suggest how to implement liferay login code in existing loginAction() method or is there any other approach?
Alex Wallace
RE: How to create JSF based login portlet
November 18, 2008 11:12 AM
Answer

Alex Wallace

Rank: Liferay Master

Posts: 640

Join Date: November 4, 2007

Recent Posts

The code you need is in the portal source... Look at the struts action defined in the login portlet. Look in LoginAction.java or AutoLogin.java for a different approach...