Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Hello Hello Hello
problem with custom login page
7 agosto 2008 7.25
Risposta

Hello Hello Hello

Punteggio: New Member

Messaggi: 13

Data di Iscrizione: 16 maggio 2008

Messaggi recenti

Hi

Anyway has implemented custom login page by using liferay 5.1.0

I wanted to implement custom login page in portlet.

We are not using struts in our development we are using velocity and portlet for development

I referred the following URL to implement custom login

http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Customizing+the+portal+login+page/pop_up;jsessionid=7C6AA9245C5D0B867F674F9E8BA9C43D

I tried implementing the custom by using the following steps

1. I added auth.login.url=/web/guest/home in portal-ext.properties

2. If I click on login button it is redirecting to custom login page

3.once user enters his username and password I am forwarding to custom login portal but from there I am not able to redirect to the portlet (i.e. "/web/guest/2")
I had written the following code

String redirect="/web/guest/2"
HttpServletResponse httpResponse = PortalUtil.getHttpServletResponse(res);
httpResponse.sendRedirect(redirect);

here res is RenderResponse or ActionResponse

4. I tried with implementing the same with servlet i.e. once user enters his login and password I called servlet there I authenticate user after that I redirect to different portlet here redirect is happening but header and footer is not refreshing and still it is showing login and register icons on header instead of myprofile and logout icons.

Can one help how to resolve these issues?
Christianto Sahat
RE: problem with custom login page
7 agosto 2008 19.58
Risposta

Christianto Sahat

Punteggio: Regular Member

Messaggi: 175

Data di Iscrizione: 24 settembre 2007

Messaggi recenti

Ramchandra Reddy Muniganti:
Hi

Anyway has implemented custom login page by using liferay 5.1.0

I wanted to implement custom login page in portlet.

We are not using struts in our development we are using velocity and portlet for development

I referred the following URL to implement custom login

http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Customizing+the+portal+login+page/pop_up;jsessionid=7C6AA9245C5D0B867F674F9E8BA9C43D

I tried implementing the custom by using the following steps

1. I added auth.login.url=/web/guest/home in portal-ext.properties

2. If I click on login button it is redirecting to custom login page

3.once user enters his username and password I am forwarding to custom login portal but from there I am not able to redirect to the portlet (i.e. "/web/guest/2")
I had written the following code

String redirect="/web/guest/2"
HttpServletResponse httpResponse = PortalUtil.getHttpServletResponse(res);
httpResponse.sendRedirect(redirect);

here res is RenderResponse or ActionResponse

4. I tried with implementing the same with servlet i.e. once user enters his login and password I called servlet there I authenticate user after that I redirect to different portlet here redirect is happening but header and footer is not refreshing and still it is showing login and register icons on header instead of myprofile and logout icons.

Can one help how to resolve these issues?



Hi Ramchandra,

What you need is to customize redirect after login. There's an article that explains how to do this in Liferay Wiki :

http://www.liferay.com/web/guest/community/wiki/-/wiki/1071674/Custom+redirect+after+login
Hello Hello Hello
RE: problem with custom login page
8 agosto 2008 3.21
Risposta

Hello Hello Hello

Punteggio: New Member

Messaggi: 13

Data di Iscrizione: 16 maggio 2008

Messaggi recenti

Hi Chris,

I want to implement custom login portlet instead of the one bundled with Liferay.

Do you have any idea how can we implement custom login portlet?
Lari Tuominen
RE: problem with custom login page
8 agosto 2008 8.01
Risposta

Lari Tuominen

Punteggio: Expert

Messaggi: 283

Data di Iscrizione: 7 novembre 2007

Messaggi recenti

Hello emoticon

You can find sample sign-in portlet from liferay's repository. Perhaps that will help.

- Lari
Hello Hello Hello
RE: problem with custom login page
11 agosto 2008 22.08
Risposta

Hello Hello Hello

Punteggio: New Member

Messaggi: 13

Data di Iscrizione: 16 maggio 2008

Messaggi recenti

Hi Lari,

Thanks for your reply.

The sample signin portlet helped me alot

Regards
Ram
Gaurav Gunjan Jha
RE: problem with custom login page
27 agosto 2008 3.20
Risposta

Gaurav Gunjan Jha

Punteggio: New Member

Messaggi: 5

Data di Iscrizione: 5 agosto 2008

Messaggi recenti

Hi ,

I was trying to implement Custom Login like you all .But i am not able to have the correct result even after doing the steps suggested by all of you for Deafault Landing Page . Please correct me if i have done wrong

1 ) I created liferay using source code available on Liferay Website and the Liferay environment is up and Ruinning .
2) I created a few public pages using the default user id Test in the already available community Liferay Los Angeles.
3) I named the first public page as home page in Liferay Los Angeles and added Sign In Portlet there .
4) I wanted that on signing in this Sign In Portlet in Home Public Page of Liferay LOS Angeles i could go land to some other Public or
private page .
5) I created another public page elearning in public page section of Liferay Los Angeles .


Actions that i had performed as stated in the forums for Deafault Landing Page :-

I copied Portal.properties file into portal-ext.properties file in ext\ext-impl\classes folder and did the following

1 ) auth.forward.by.last.path=true
2 ) default.landing.page.path=/web/44/elearning


Hower i don't see any changes .The website behavior still remains the same . what have i missed here ?? Have i placed the portal-ext .properties file correctly ??

Thanks in advance
Lari Tuominen
RE: problem with custom login page
27 agosto 2008 4.20
Risposta

Lari Tuominen

Punteggio: Expert

Messaggi: 283

Data di Iscrizione: 7 novembre 2007

Messaggi recenti

Hi,

Place your portal-ext.properties file to <your-app-server-deploy-dir>/ROOT.war/WEB-INF/classes/ folder.

Alternatively you can change properties in portal-properties file which is located in ROOT.war/WEB-INF/lib/portal-impl.jar (Just remember that these will be overriden by portal-ext.properties......)

- Lari
Gaurav Gunjan Jha
RE: problem with custom login page
27 agosto 2008 5.43
Risposta

Gaurav Gunjan Jha

Punteggio: New Member

Messaggi: 5

Data di Iscrizione: 5 agosto 2008

Messaggi recenti

Hi Lari ,

Many thanks for your Reply . I couldn't find root.war file . Are you talking about this kind of Location ext\servers\webapps\ROOT\WEB-INF\classes

Is the appserver deploy directory the same as ext /server directory ? I have used the Liferay source code available on Liferay Website ?

Many thanks in Advance

Gaurav Gunjan
AppleNOrange AppleNOrange
RE: problem with custom login page
27 agosto 2008 8.00
Risposta

AppleNOrange AppleNOrange

Punteggio: New Member

Messaggi: 18

Data di Iscrizione: 19 luglio 2005

Messaggi recenti

Gaurav,

If you have the ext environment setup, you will find portal-ext.properties under

$EXT_HOME/ext-impl/classes/

FYI: You will find system-ext.properties at the same location.

If you don't have the ext environment, you can put portal-ext.properties

In tomcat, under $TOMCAT_HOME/webapps/ROOT/WEB-INF/classes
In jboss+tomcat, under $JBOSS_HOME/server/default/deploy/ROOT.war/WEB-INF/classes

I hope this helps! emoticon
Gaurav Gunjan Jha
RE: problem with custom login page
27 agosto 2008 9.59
Risposta

Gaurav Gunjan Jha

Punteggio: New Member

Messaggi: 5

Data di Iscrizione: 5 agosto 2008

Messaggi recenti

Hi ,

i have the portal-ext.properties file available in the ext/ext-impl/classes folder and i had copied the contents of portal.properties file in it .Later on i edited the follwoing 2 lines

1 ) auth.forward.by.last.path=true
2 ) default.landing.page.path=/web/44/elearning


but still i am not able to go to the page /web/44/elearning after i log into the Sign In Portlet . I would also like to know the following

1 ) if everytime we make changes into the portal-ext.properties pages do we have to do ant clean deploy for changes to be effective again ??

2) i have used the source code available on Liferay website . Is it correct one to use ? or we need to use the one Svn code available in repositories ??

3) I copied the whole contents of portel.properties into portal-ext.properties . Is it correct to do so or we need to only add changes in portal-ext.properties ??

4) Is the location where we have to put the portal-ext.properties file as ext/ext-impl/classes or is it something different ? I read some posts about change in directories in newer versions . I even copied the portal-ext.properties file to ext/ext-impl/src folder but still nothing works ?

Thanks in Advance again
Ray Augé
RE: problem with custom login page
27 agosto 2008 11.08
Risposta

Ray Augé

LIFERAY STAFF

Punteggio: Liferay Legend

Messaggi: 1171

Data di Iscrizione: 7 febbraio 2005

Messaggi recenti

Gaurav Gunjan Jha:
i had copied the contents of portal.properties file in it .Later on i edited the follwoing 2 lines

1 ) auth.forward.by.last.path=true
2 ) default.landing.page.path=/web/44/elearning


please don't do this...

the correct method is simply to put the "changed" values in portal-ext.properties.

e.g. full contents of your portal-ext.properties:

1auth.forward.by.last.path=true
2default.landing.page.path=/web/44/elearning


If you copy everything from portal.properties to portal-ext.properties... when you upgrade... if we change defaults (which we often do when adding new updated/features) you're portal will behave unexpectedly and be very hard to identify the problem.

HTH!
mahi kommi
RE: problem with custom login page
18 marzo 2010 15.31
Risposta

mahi kommi

Punteggio: New Member

Messaggi: 3

Data di Iscrizione: 11 febbraio 2010

Messaggi recenti

hi,

auth.forward.by.last.path=true
default.landing.page.path=/web/44/elearning

with these properties iam able to redirect the user to desired page once he signedin using my custom signinportlet.But to let him sign into that portal iam using liferays sign in portlet.how to make user signed into the portal automatically once he fills his information in my customsignin portlet? Will it be achieved through any properties?
any help appreciated.

Thanks inadvance
Mahi