#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    1
    Rep Power
    0

    invalidating current session in java bean?


    Hi,

    I need to write a logout() method in my Java Bean to invalidate
    the current session upon logout.
    But i keep getting error when i try to access the session.
    bu using
    session.invalidate();


    Does anyone know how to retrieve the current session in a Java Bean??
    Thanks..
  2. #2
  3. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    Beans don't have access to the request object (as far as I know), so you're going to have to pass the session to the bean. Maybe like:
    Code:
    myBean.logout( session );

IMN logo majestic logo threadwatch logo seochat tools logo