I have UI that is served by two HTTP servers. Therefore I need to clean the HTTP session from both servers. It is simple for the logout use case but not clear for me how to do it for the session timeout use case.
The notification on the server side is possible via HttpSessionBindingListener Getting notification when bounded/unbounded to a HTTP session. But how can I notify the client site about it? I have to send the request from a browser to the second server to be able to clean a session cookie on the second server and therefore I can not send request from the server side.
Added
One server is Tomcat 8, the second server is Apache HTTPD server. I want to solve it via UI callback is possible (from the Tomcat HTTP servlet server).
Session timeout represents the event occuring when a user does not perform any action on a web site during an interval (defined by a web server). The event, on the server side, changes the status of the user session to 'invalid' (ie.
Type KeepAliveTimeout, and then press ENTER. On the Edit menu, click Modify. Type the appropriate time-out value (in milliseconds), and then click OK. For example, to set the time-out value to two minutes, type 120000.
If your Internet connection is unstable, periodically disconnecting and reconnecting, it can cause a website session to expire. When the Internet connection is lost the website connection can be terminated, resulting in a session expired message if you try to access any page after the Internet reconnects.
If you want to determine when the countdown for timeout starts, you can can go to the Logic tab, right-click on the Server Actions folder, select Add System Event and then On Begin Web Request. This will create an action that will run every time your module handles a new request.
From Apache HTTPD (Apache) documentation:
Integrating Sessions with External Applications
https://httpd.apache.org/docs/2.4/mod/mod_session.html#integration
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With