Nope, not as far as I know... in fact, I just implemented a listener today that does some maintenace-type things like the code below, and it works fine, that's under Tomcat 5.5.28 I believe... spec 2.3 as I tecall?

sessionDestroyed() would be all but useless if you couldn't get at the attributes, I would be utterly shocked if the spec changed in that way... I'd bet you saw either a bad implementation, or you actually ARE losing your mind :) (not to worry, wherever yours is, mine is right behind it!)

Frank

Van wrote:
On 7/25/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:

SessionListener is what you want.

Here's an example from one of my apps (condensed for space)... it is used
to delete a temporary PDF that may have been generated for the user when
they log off:

import company.app.User;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
public class MySessionListener implements HttpSessionListener {
public synchronized void sessionCreated(HttpSessionEvent se) {
}
public synchronized void sessionDestroyed(HttpSessionEvent se) {
  HttpSession sess = se.getSession();
  User user = (User)sess.getAttribute("user");
  String userID = user.getUserID();
  AppHelpers.deletePDF(userID);
}
}


I could be losing my mind, but, I swear that I tried this technique
once and by the time the sessionDestroyed() method was called, I was
not able to get any of the session attributes back anymore. For
various reasons, the webapps I develop need to be deployable in a
Servlet 2.3 environment. Is this something where the behavior changed
for the better in Servlet 2.4 versus 2.3?

-Van


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to