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 :
- Create a javascript/ directory in the PAR structure.
- Add the file idleTimeoutHandler.js in this directory : this is the idle-timeout-handling javascript file.
- Add the file disconnect.html in the main directory : this is the HTML popup.
- 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:

















































Interesting…and I agree with all of it. Keep up the excellent work…I will undoubtedly be back soon
This is indeed a fantastic resource. Thank you for making this publicly available.