Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Samir Issa
After Logout redirect to Http
March 7, 2012 1:11 PM
Answer

Samir Issa

Rank: New Member

Posts: 15

Join Date: April 1, 2011

Recent Posts

Hi ,

i´m trying redirect toimcat to http , after logout , i´m using Tomcat 7.0.19 with Liferay Portal Community Edition 6.0.6 CE and jdk 1.6.0.26.

My redirect to HTTPS is ok , i`m using :

company.security.auth.requires.https=true
web.server.https.port=443
web.server.http.port=80

and in web.xml


<security-constraint>
<web-resource-collection>
<web-resource-name>Login</web-resource-name>
<url-pattern>/my-portal</url-pattern> <--- ITs my page to login
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Home</web-resource-name>
<url-pattern>/home</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>

In server.xml :


<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="443" URIEncoding="UTF-8" />

<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" keystoreFile="conf/keystore" keystorePass="goku2008" URIEncoding="UTF-8"/>



_____________________________________________________________


Now i need what Tomcat return to HTTP to after logout !!


Thanks anybody for help !!
David H Nebinger
RE: After Logout redirect to Http
March 7, 2012 9:05 PM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7250

Join Date: September 1, 2006

Recent Posts

You can use a logout.events.post handler to do a redirect on logout.
Samir Issa
RE: After Logout redirect to Http
March 8, 2012 4:27 AM
Answer

Samir Issa

Rank: New Member

Posts: 15

Join Date: April 1, 2011

Recent Posts

Ok ,


i tried default.logout.page.path = http://www.XXX.com and others path , but no redirect in some cases and in other the https was still there .


You are talk about devolper a custom action to logout.events.post=com.liferay.portal.events.LogoutPostAction ????

and how can i do that ??


thanks !
David H Nebinger
RE: After Logout redirect to Http
March 8, 2012 5:08 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7250

Join Date: September 1, 2006

Recent Posts

default.logout.page.path only works for local redirects, not for external redirects.

Yes you'd have to create a LogoutPostAction implementation to handle this. Check the DefaultLogoutPageAction for an example of what you'd need to do...
Víctor Salvans Montesó
RE: After Logout redirect to Http
April 17, 2013 1:16 AM
Answer

Víctor Salvans Montesó

Rank: New Member

Posts: 7

Join Date: December 4, 2012

Recent Posts

I'm working on a portal Liferay 6.0.5 with lots of communities (websites for me). I need to set a "after logout url" for each community. All the posts talk about a server solution but not a community. Is any easy way to do it without change server settings, because I can't access to them, and I can redirect others community's users to the same place!.

Any link like /c/portal/logout?redirect=specific_url is possible????

Thanks!
Samir Issa
RE: After Logout redirect to Http
April 17, 2013 5:52 PM
Answer

Samir Issa

Rank: New Member

Posts: 15

Join Date: April 1, 2011

Recent Posts

Hi ,

i think that is not possible , because you need set the class ,in server properties,to redirect after logout


Thanks
Jack Bakker
RE: After Logout redirect to Http
April 18, 2013 2:10 PM
Answer

Jack Bakker

Rank: Liferay Master

Posts: 641

Join Date: January 3, 2010

Recent Posts

below is from my hook LogoutPreAction where I set after logout redirect somwhere if a user is in a particular role ; perhaps you can use something similar for a community

1
2long companyId = com.liferay.portal.util.PortalUtil.getCompanyId(request);
3long userId = com.liferay.portal.util.PortalUtil.getUserId(request);
4            
5long roleId = RoleLocalServiceUtil.getRole(companyId, "role_name").getRoleId();
6if(UserLocalServiceUtil.hasRoleUser(roleId,userId)){
7    request.setAttribute(WebKeys.REFERER, "/web/somewhere");
8}