Sunday, July 31, 2011

How to Automatically Redirect to Different Page on session timeout in Oracle ADF


You might be aware of my previous Session Timeout Post in Oracle ADF.

By default if timeout happens ADF don't give you any warning message unless enable it (Post by Frank Nimphuis explained)  you send some request to server (like click on page) after timeout. Our requirement was to redirect the page to default home page automatically after 15 minutes of inactivity.

Note: We had Webcenter 11g PS2 Spaces application.

The solution we implemented is to write a JavaScript code on PagePhaseListener which integrate code on every page as similar to this blog post

Download the sample code

More details in this video

Happy JDeveloping,
Zeeshan Baig


  1. Great post, this really helps me out!

    In webcenter 11g PS3 onward, there is bug that session timeout will redirect you to the last page you visited, if this page is protected by ADF security, you will hit 404 not found.
    Can't believe Oracle leaves such stupid bug unfixed!

  2. Hi Bain zeeshan,
    I'm facing problem if I used SSL certificate, I cannot navigate to expire page, instead of expired page showing the blank page without error.

    1. Hi,

      It is difficult to tell what could be the problem. Check the log files there must be something there.