How to create a logout option for the Spectrum OneClick webpage
search cancel

How to create a logout option for the Spectrum OneClick webpage

book

Article ID: 125316

calendar_today

Updated On:

Products

Spectrum

Issue/Introduction

Out of the box Spectrum OneClick does not have a logout option.
We introduced this feature to the Webclient but not the OneClick page itself.

This KB will walk through using the code already built for the WebClient and using it for the OneClick webpage.

Environment

10.4.x

Resolution

1. Navigate to $SPECROOT/tomcat/webapps/spectrum/console
2. Open the console-menubar.jsp in a text editor.
3. Add this code to the JSP:
 


<th>
<a href="webclient/logoutoc.jsp">Logout</a>
</th>


 


This can be placed anywhere but for the sake of this KB, we placed it next to the "Start Console" link as it seemed to make sense there.


4. Save the file and exit.
5. Next, navigate to the $SPECROOT/tomcat/webapps/spectrum/webclient
6. Copy the logout.jsp to the same location as logoutoc.jsp


7. Confirm the permissions on logoutoc.jsp are NOT read-only.
8. Open the logoutoc.jsp in a text editor.
9. At the very bottom, the following code will be seen:
 


<h1>You are now logged out </h1>
Click <a href="/index.jsp">here</a> to Re-Login.



Change this to:
 


<h1>You are now logged out </h1>
Click <a href="../index.jsp">here</a> to Re-Login.



10. Save the file and exit.

The tomcat service does not need to be restarted but the webpage will need to be refreshed.  I.e. Hold shift and click the refresh button in your browser.
A logout option should now be seen:

Attachments

1558690939422000125316_sktwi1f5rjvs16gff.gif get_app
1558690937503000125316_sktwi1f5rjvs16gfe.jpeg get_app
1558690935612000125316_sktwi1f5rjvs16gfd.jpeg get_app
1558690932611000125316_sktwi1f5rjvs16gfc.jpeg get_app