Re: invalidate session after calling listeners

2005-08-29 Thread Hassan Schroeder
Franklin Phan wrote: I have found the solution. Cool. :-) What threw me off in the first place was the poor API documentation for HttpSessionBindingListener interface. It says for valueUnbound: "Notifies the object that it is being unbound from a session and identifies the session." It g

Re: invalidate session after calling listeners

2005-08-29 Thread Franklin Phan
Hassan, I have found the solution. I think that a big part of what you were saying was something that I was already doing but neglected to mention (i.e., having a line of code in the JSP to bind the listener object to the session using setAttribute). Your commenting out my two lines of code d

Re: invalidate session after calling listeners

2005-08-28 Thread Franklin Phan
Hassan, Also, I don't understand the difference between a "global" and a "non-global" listener approach. Can you explain? Thanks. Thanks. Hassan Schroeder wrote: Franklin Phan wrote: I'm trying to code a method to clean up specifically named files inside a working dir (in Windows XP) whe

Re: invalidate session after calling listeners

2005-08-28 Thread Franklin Phan
Hassan, How do I add an instance of the listener to each session? Can you please provide an example? I forgot to mention that I already have the following in the first JSP after the login is validated: <% session.setAttribute("sessionListener", listener); %> What you say, "...and that ob

Re: invalidate session after calling listeners

2005-08-27 Thread Hassan Schroeder
Franklin Phan wrote: I'm trying to code a method to clean up specifically named files inside a working dir (in Windows XP) whenever the session times out. Rather than a global listener approach, why not just add an instance of your listener *to each session*? When the session ends and that o

Re: invalidate session after calling listeners

2005-08-26 Thread Franklin Phan
Darek, I've tried your suggestion. As I've said before: I need to access the Session object. This is what I have: package abcd; import java.io.*; import javax.servlet.http.*; public class AbcdSessionListener implements HttpSessionBindingListener { private String userId; public void val

Re: invalidate session after calling listeners

2005-08-26 Thread Darek Czarkowski
You could implement HttpSessionBindingListener and define your own valueBound and valueUnbound methods. DarekC On Fri, 2005-08-26 at 13:08, Franklin Phan wrote: > Is there a way to set Tomcat to call listeners before invalidate() is called > on a session? > I'm trying to code a method to clean u