cancel
Showing results for 
Search instead for 
Did you mean: 

Hanging sessions after logout/logoff in SAP Enterprise Portal

eliasbergan
Explorer
0 Kudos

Hello experts!

There seems to be problems with hanging sessions in our SAP Enterprise Portal when logging off.

In my NWDS I have created a project named tc~sec~ume~logon~ui

which is the SAP portal 7.4 logon. I see the logoffPage.jsp there.

I also read the Troy Cronins blog "EP: Sessions Part 2".

I edited the logoffPage.jsp and added his javascript code to the logoffPage.jsp but where should

the html code correctly be inserted?

These are my references:

Appendix: JavaScript Code for Session Termination - Portal - SAP Library

Best regards,

Elias

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member186017
Active Participant
0 Kudos

Hello Elias,

Please check whether note 1958240 is relevant for your case.

Thanks & BR,

Nadav.

troy_cronin2
Active Contributor
0 Kudos

Hi Elias

As per your mail queries.

Regarding our discussions on the "Logoff Button" you should be able to edit the properties directly without the need for a new project as tt's a setting in the masthead iView. Find your franework  page, select the masthead iView and in the properties turn off the logoff option.

If you want to now use your own logoff page for your application, you can overwrite this standard page on the sub-node of your application.

To do this you are correct as you can indeed go to the service node of your application in SICF and enter your own data under:

"Error Pages" & "Logoff Pages". You can enter your text on this screen or go to another page.

In stand-alone cases a logoff (deletion of MYSAPSSO2 cookie) can be triggered in the exit plug.

If an application is closed by an Exit Plug , and no other application is started, the Web Dynpro Framework sends a standard logoff page to the browser. This is entered in the Web Dynpro service node (/default_host/sap/bc/webdynpro). The Web Dynpro node is the parent node of all Web Dynpro ABAP applications you create.

Kind Regards

Troy Cronin

troy_cronin2
Active Contributor
0 Kudos

Hi Elias

I hope you are well and many thanks for using the SAP Discussion Threads .

Regarding the scenario you mentioned the following:

Issue: There seems to be problems with hanging sessions in our SAP Enterprise Portal when logging off. In my NWDS I have created a project named tc~sec~ume~logon~ui which is the SAP portal 7.4 logon. I see the logoffPage.jsp there. I also read the Troy Cronins blog "EP: Sessions Part 2".

I edited the logoffPage.jsp and added his javascript code to the logoffPage.jsp but where should

the html code correctly be inserted?

Observations: As we are dealing with coding here the key approach in this scenario requires diligence as you know so no discrepancies or invalid configuration or code snippets come into play.

In terms of following the blog by coding my assumption is that you are referring to the Appendix: JavaScript Code for Session Termination is this correct? If so as we know this code appendix deals with the "Logoff" button and the command action that follows.


Now as we know the logoff functionality is defined in the login application - tc~sec~ume~logon~ui. Interoperability between an SAP NetWeaver portal and any other portal is accomplished by running SAP portal iViews in an inner iFrame. Your company portal initiates the logon with the SAP NetWeaver portal, thereby starting a new session on the SAP portal side, and with its connected back-end systems.


To me, this means that you have to implement the logoff javascript found in the appendix in your company portal.

Just remember to proceed with this with care to avoid any follow on issues/errors/exceptions!

Regarding the the logoffPage.jsp this is part of logon application as the logonPage.jsp too.


Now in terms of the HTML Editing kindly check the link for overview guidance

Kind Regards & let me know how you get on

Troy Cronin - Enterprise Portal Support Engineer




eliasbergan
Explorer
0 Kudos

Thanks Troy and yes, I am following the overview guidance Customizing Logon Page on Portal 7.3

where we also have successfully added some links on the logon page.

What is not clear to me is to where the actual call to

<a href="#" onclick="logoffPortal();">Logoff</a> should be done as I do not want a separate button for this but rather trigger the code when the standard logoff button from SAP is clicked on.

Do I need to do something with MastHead(?logoff button?) in order to accomplish this or
do you know where to do the code change?

I do not know why SAP standard can not handle the sessions correctly, but it may have to do with our setup which I am not aware of in detail.

Best regards,

Elias

troy_cronin2
Active Contributor
0 Kudos

Hi Elias

Many thanks for the response and it is no problem at all I'm very happy to help out .

Queries

  • You successfully added links on the logon page.
  • What is not clear is  the actual call to <a href="#" onclick="logoffPortal();">Logoff</a>
  • You do not want a separate button for this but rather trigger the code when the standard logoff button from SAP is clicked on.

Comments


  • The portal logon session that a user utilizes upon entering the Portal is a browser based session cookie and therefore if this user closes the browser this should kill the session.
  • It is possible to catch the browser close action in JavaScript (in fact this is how DSM termination works in the portal), but if the user is really closing the browser fully then the logon ticket is deleted anyway and the next user has to use a new browser session and therefore create their own logon ticket (by logging on).
  • Regarding the Masthead "Logoff Button" it is possible to write the code in headerview.jsp file in masthead par file.  There you will find logoff method and you can write the browser close function there.

For the underlying configuration setup + where to make the code changes of the logoff button kindly see this link - http://scn.sap.com/docs/DOC-56562

Kind Regards & let me know how you get on

Troy Cronin - Enterprise Portal Support Engineer