Hi guys,
I have implemented HttpSessionBindingListener as i want to track when a particular user was bound or unbound to the session.
I have to store some values in ServletContext (context scope), but inside this class (
which implements HttpSessionBindingListener) i am not able to get the reference to ServletContext.
Following is the code snippet of valueBound method of my class :-
Ideally the code in Bold should work and get the
servlet context for me.
But it doesn't, coz HttpSession Interface (of servlet specification 2.2) doesn't define getServletContext() method
(I am using Tomcat 3, which works with Servlet Specification 2.2).
So the method getServletContext() must have been included in the later specifications like 2.3 or 2.4
Is there anyway which could solve my requirement, which is to get the reference to the context of the current web application, as i need to store some values in the context scope.
TIA
[ May 05, 2004: Message edited by: Manish Sachdev ]