I am not sure if i have the answer but ...
when the session has timed out then the class that is implementing HttpSessionListener interface can do something.... given that you want to do something AFTER the session has timed out
Why to worry about things in which we dont have control, Why to worry about things in which we have control ! !
But one thing such a listener cannot do is to communicate with the client in any way. To issue an alert, for example.
The OP is thinking of the problem backwards. Upon a request, whether the session has expired of not can be checked (a filter is great for this). But if no request has been made, there's not much to be done.