we define a lot listener classes in web.xml descriptor lg. <listener> <listene-class>MySessionAttributeListener</listener-class> </listener> <listener> <listene-class>MyContextAttributeListener</listener-class> </listener> my question is how do the server know which class is tied by listner class?
Sun Certified Java Programmer<br />Sun Certified Web Component Developer
Guy Allard
Ranch Hand
Joined: Nov 24, 2000
Posts: 776
posted
0
Well, out on a little limb .... The container uses the Java Reflection API. The relevant packages are java.lang.reflect and java.lang.Class. The class is coded in web.xml. The container looks at that and determines the interface which is implemented (not the class). It thus knows what to call under what curcumstances. G.