Dynamicly add a SessionListener

Hi!

Is there a way to dynamicly add a SessionListener to the environment? In my eyes it's a bit copious to add a "global" HttpSessionListener to the servlet via:

<listener>

<listener-class>package.MySessionListener</listener-class>

</listener>

why it is not possible to programmaticly add a SessionListener to a session?

[384 byte] By [MFernaua] at [2007-11-26 20:06:37]
# 1

The SessionListener is to inform an interested class that a session is about to be created/destroyed. A session does not need this information since it knows when it is created/destroyed.

As for programmaticallly adding listeners, the short answer is no. The implementation of listeners is application server specific.

tolmanka at 2007-7-9 23:08:12 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...