Question
1
Replies
219
Views
Posted: September 13, 2018
Last activity: September 24, 2018
Closed
how to Keep Alive outer java application's session when inner (PRPC) application's session is active
Hi,
To maintain session timeouts, we would like to keep alive the outer java application's session whenever PRPC application which is embedded in an iframe of the outer application is active. For example, when the user clicks a button in PRPC, we would like to keep the outer application's session active. Thoughts? Using PRPC 6.3 SP1
Although rather fragile and a little risky (cross-site scripting) you can invoke a parent window function from your iframe as described here: https://stackoverflow.com/questions/2161388/calling-a-parent-window-function-from-an-iframe
Then it's up to the parent function to ensure that the session is kept alive by pinging the server using an AJAX call:
Please check the following example if you need to implement it in Java:
https://www.logicbig.com/tutorials/java-ee-tutorial/java-servlet/auto-redirect-to-login-page-on-session-timeout.html