[opencms-dev] Redirecting to Index page if the user logs out in a protected page

Pujan Kafle kafle.pujan at jimmy.harvard.edu
Tue Mar 30 17:09:12 CEST 2010


Hi Paul,

Thank you for your reply. But there are some pages in the website as 
well which are accessible to all. In such cases, when the user logs out, 
user should stay in the same page(the login area would now show username 
and password textboxes).

So, depending on the permissions of the page in which the user logs out, 
the user would be redirected to the index page using the way you 
suggested or no redirection would occur if the page is public.

Any suggestions would be highly appreciated.

Thanks,
Pujan


Paul-Inge Flakstad wrote:
> Hi Pujan
> 
> Sounds to me like all you need to do is redirect (response.sendRedirect("/your/site/indexpage.html");) after logout procedures have completed?
> 
> Paul
> 
>> -----Original Message-----
>> From: opencms-dev-bounces at opencms.org 
>> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Pujan Kafle
>> Sent: 30. mars 2010 16:50
>> To: The OpenCms mailing list
>> Subject: [opencms-dev] Redirecting to Index page if the user 
>> logs out in a protected page
>>
>> Hello everyone,
>>
>> I have included a small login form on my main template. All the web 
>> pages in my site, including the protected ones use the main template.
>> However, when I log out from a protected web page, it 
>> immediately shows 
>> me a HTTP Authentication required popup, which asks for OpenCms login 
>> credentials. If I click cancel, I am redirected to Tomcat's 
>> HTTP Status 
>> 401- Error Page.
>>
>> I am wondering, in such scenarios, is it possible to redirect 
>> the user 
>> to the index page of the site, thus avoiding that 
>> Authentication pop-up 
>> and Tomcat's error page.
>>
>> Your suggestions would be highly appreciated.
>>
>> Thanks,
>> Pujan
>>
>> _______________________________________________
>> This mail is sent to you from the opencms-dev mailing list
>> To change your list options, or to unsubscribe from the list, 
>> please visit
>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list