The other day, a customer asked me how to change the logout URL for Lotus Connections. They wanted to configure Lotus Connections so that when a user clicked on 'Log out' they would be redirected to the company's intranet home page.
I couldn't find any documentation out there, so I put on my hacker hat. After a couple of minutes (ok, maybe 30 minutes), I was able to figure it out. I decided to capture my changes and share it with you. You'll notice that while the process may look long, it's really only changing 1 line of code in 6 different files... so it's really easy!
Activities and Home page:
- Go to <WAS_PROFILE_ROOT>\installedApps\<CELL_NAME>\Activities.ear\oawebui.war\WEB-INF\jsps\html_prototype\fragments\mainpage
- Save a backup of banner.jsp
- Open banner.jsp with your favorite text editor
- Look for the following lines:
<form method="post" action="ibm_security_logout" name="logout" id="logoutForm" style="display: none;" >
<input type="hidden" name="logoutExitPage" value="/service/html/mainpage">
<input type="submit" name="logout" value="Logout">
</form>
- Change the logoutExitPage parameter as shown below:
<form method="post" action="ibm_security_logout" name="logout" id="logoutForm" style="display: none;" >
<input type="hidden" name="logoutExitPage" value="http://w3.acme.com/home">
<input type="submit" name="logout" value="Logout">
</form>
- Save the file
- Repeat steps 1-6 for the following file:
- <WAS_PROFILE_ROOT>\installedApps\<CELL_NAME>\Homepage.ear\dboard.war\web\jsp\pageheader.jspf (touch main.jsp afterwards to force recompilations of the JSP fragment)
Blogs:
- Go to <WAS_PROFILE_ROOT>\installedApps\<CELL_NAME>\Blogs.ear\blogs.war\roller-ui
- Save a backup of logout-redirect.jsp
- Open logout-redirect.jsp with your favorite text editor
- Look for the following line:
response.sendRedirect(request.getContextPath() + "/ibm_security_logout?logoutExitPage=" + "/");
- Change the logoutExitPage parameter as shown below:
response.sendRedirect(request.getContextPath()
+ "/ibm_security_logout?logoutExitPage=" + "http://w3.acme.com/home");
- Save the file
Communities:
- Go to <WAS_PROFILE_ROOT>\installedApps\<CELL_NAME>\Communities.ear\tango.web.ui.war\WEB-INF\jsps\html\scenes\dashboard
- Save a backup of banner.jsp
- Open banner.jsp with your favorite text editor
- Look for the following line:
logoutSection.innerHTML ='<html:link page="/service/html/logout"><fmt:message key="link.logout" /></html:link>';
- Change the page parameter as shown below:
logoutSection.innerHTML ='<html:link page="/ibm_security_logout?logoutExitPage=http://w3.acme.com/home"><fmt:message key="link.logout" /></html:link>';
- Save the file
Dogear:
- Go to <WAS_PROFILE_ROOT>\installedApps\<CELL_NAME>\Dogear.ear\dogear.webui.war\h3\jsp\main
- Save a backup of pageHeader.jspf
- Open pageHeader.jspf with your favorite text editor
- Look for the following line:
logoutSection.innerHTML =<jscript:string><a title="<fmt:message key="jspf.menu.logout.title"/>" href="<c:url value="/logout" />"><fmt:message key = "jspf.menu.settings.logout"/></a></jscript:string>;
- Change the value parameter as shown below:
logoutSection.innerHTML =<jscript:string><a title="<fmt:message key="jspf.menu.logout.title"/>" href="<c:url value="/ibm_security_logout?logoutExitPage=http://w3.acme.com/home />"><fmt:message key = "jspf.menu.settings.logout"/></a></jscript:string>;
- Save the file
- Touch h3.jsp (to force recompilation of the JSP fragment)
Profiles:
- Go to <WAS_PROFILE_ROOT>\installedApps\<CELL_NAME>\Profiles.ear\peoplepages.war\WEB-INF\jsps\ajax
- Save a backup of loginInfo.jspf
- Open loginInfo.jspf with your favorite text editor
- Look for the following line:
<html:link page="/ibm_security_logout?logoutExitPage=/index.jsp" styleId="logoutLink">
- Change the logoutExitPage parameter as shown below:
<html:link page="/ibm_security_logout?logoutExitPage=http://w3.acme.com/home" styleId="logoutLink">
- Save the file
Hope this is useful to you.