Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Rajesh S
to redirect to a page when session expires
March 8, 2009 10:50 PM
Answer

Rajesh S

Rank: New Member

Posts: 12

Join Date: February 12, 2009

Recent Posts

hi all,

i want to redirect to the login page when session expires .
how can do this.
i have tried session.js and change the following line


line 5 >redirectOnExpire: true,
line 110>location.href = themeDisplay.getURLHome()+"/c/portal/logout";


but stil its not workin ,so any one help me

Thanks ,
with Regards,
Rajesh.S
Srikanth Reddy Sanivarapu
RE: to redirect to a page when session expires
March 8, 2009 10:51 PM
Answer

Srikanth Reddy Sanivarapu

Rank: Regular Member

Posts: 193

Join Date: November 14, 2008

Recent Posts

Rajesh S:
hi all,

i want to redirect to the login page when session expires .
how can do this.
i have tried session.js and change the following line


line 5 >redirectOnExpire: true,
line 110>location.href = themeDisplay.getURLHome()+"/c/portal/logout";


but stil its not workin ,so any one help me

Thanks ,
with Regards,
Rajesh.S


Hi,
No need to change in js files and all.

Change in portal.properties file the property

session.timeout.redirect.on.expire to true

I think it will helpfull for you.

Thanks & Regards,
Srikanth Reddy.S
Rajesh S
RE: to redirect to a page when session expires
March 8, 2009 11:51 PM
Answer

Rajesh S

Rank: New Member

Posts: 12

Join Date: February 12, 2009

Recent Posts

hi srikanth,
thanks for the reply,

i have changed portal.properties stil its not workin ,



regards ,
Rajesh S
Srikanth Reddy Sanivarapu
RE: to redirect to a page when session expires
March 9, 2009 12:08 AM
Answer

Srikanth Reddy Sanivarapu

Rank: Regular Member

Posts: 193

Join Date: November 14, 2008

Recent Posts

Hi Rajesh,

Have u built that again?
and after the jar is created u need to put in $tomcat/webapps/root/web-inf/lib folder.
And restart the server again.
Then check the modification?

Thanks & Regards,
Srikanth Reddy.S
Rajesh S
RE: to redirect to a page when session expires
March 9, 2009 2:01 AM
Answer

Rajesh S

Rank: New Member

Posts: 12

Join Date: February 12, 2009

Recent Posts

hi srikanth,

i have builded and restarted the tomcat ,

the page redirect is workin good for all other pages except my portal page.

i have written a new portal and those portal pages are viewd using a public page .
if session expires i pressed f5 to reload but it stands in same page and it doesnt redirected.
i dont know y?
Srikanth Reddy Sanivarapu
RE: to redirect to a page when session expires
March 9, 2009 9:14 PM
Answer

Srikanth Reddy Sanivarapu

Rank: Regular Member

Posts: 193

Join Date: November 14, 2008

Recent Posts

Hi,

I am not getting what u r saying..
Can you please send screenshots of ur problem?

Thanks & Regards,
Srikanth Reddy.S
Rajesh S
RE: to redirect to a page when session expires
March 9, 2009 10:17 PM
Answer

Rajesh S

Rank: New Member

Posts: 12

Join Date: February 12, 2009

Recent Posts

1)i have added my portlet name 'newletter' in Add Application -pg1.png
2)created a public page name newsleter and droped my portlet in that public page(newsletter)-pg2.png


after session expires ,i've pressed F5 to reload the page ,but the same page is refreshed and its not redirected to login page y?
Attachment

Attachment

Attachments: pg1.png (22.4k), pg2.png (45.3k)