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).