-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dave,
Wow, you have a gift for following multiple simultaneous threads ;) Oh, yeah, and the whole thing is off-topic... this has nothing to do with Struts (other than the fact that this listener extends action). Dave Newton wrote: > --- Christopher Schultz wrote: >> Which servlet do you want access to? > > I think he actually just wants the ServletContext so > he can remove the "userList" object: > > Srinivasula Reddy A wrote: >> The listener class is extending Action as well as >> implementing HttpSessionListener interface. >> Cant I have servlet in my sessionDestroy() method? > > Now, I know what you're thinking: doesn't > sessionDestroy() have an HttpSessionEvent argument > containing both the session and its ServletContext? I suppose if the listener extends Action, you can just call this.getServlet()... but I'm pretty sure that makes no sense whatsoever. Then again, neither does using an Action as a listener. In fact, using an Action as a listener will result in two different Action objects in memory... one that gets properly initialized and used for handling requests, and one that is /not/ properly initialized and gets used as the listener. My use of "this" above will fail miserably. Yet another argument for doing things the way they were intended... - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGbT/l9CaO5/Lv0PARAr3wAJwOShnTWAhisdHhhLSHiJxq0UZo0gCfa6+J x/82aRcmZo4D9UpSHTdUY4M= =plRo -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]