01 January 2010 ~ 2 Comments

SAP Portal: handle portal idle user timeout

[This post comes from the SDN wiki page I wrote back in May, 2008]

Abstract

The question has been asked many times. Some solutions came out in the SDN forums, but a few matched correctly the problem.

I’d like to share my solution which works great. This solution is a javascript one, which is located in the banner of the portal (masthead).

Solution

Simply edit the banner par file (com.sap.portal.navigation.masthead.par.bak) by applying the following :

  1. Create a javascript/ directory in the PAR structure.
  2. Add the file idleTimeoutHandler.js in this directory : this is the idle-timeout-handling javascript file.
  3. Add the file disconnect.html in the main directory : this is the HTML popup.
  4. Edit the file PORTAL-INF/jsp/HeaderiView.jsp in order to call the timeout handler.

Known limitations

This solution has some limitations.
Among them, the most embarassing one is the fact that the timeout timer is only reseted by subscribed events.
Unchanged, it only resets the timer on navigation changes:

EPCM.subscribeEvent("urn:com.sapportals:navigation", "Navigate", pop);

If you want to add events for resetting the timer, you’ll have to add this type of lines:

EPCM.subscribeEvent("urn:com.company.my:myservice1", "OnChange", pop);
EPCM.subscribeEvent("urn:com.company.my:myservice2", "OnRequest", pop);
//etc.

Expected result

After being idle on the portal for some time, you shoud obtain a popup like the following:

Hope you’ll find it usable!

Related posts:

  1. Automated Testing for SAP Enterprise Portal
  2. Online Filezilla Password Recovery
Tags:

2 Responses to “SAP Portal: handle portal idle user timeout”

  1. polarffour 12 July 2010 at 10:33 Permalink

    Interesting…and I agree with all of it. Keep up the excellent work…I will undoubtedly be back soon

  2. insurancebuild 13 July 2010 at 12:30 Permalink

    This is indeed a fantastic resource. Thank you for making this publicly available.


Leave a Reply