How to use invalidate session?

Total Post:159

 2015  View(s)
Rate this:

When do you call getPageContext().getSession().invalidate()?

I tried calling that at the logout page, then cflocation it back to the main page, and it throws exception.

How to assign a new session right after?

  1. Post:194

    Re: How to use invalidate session?

    getPageContext().getSession().invalidate() will invalidate the session, subsequent request with that sessionID will get an error trying to access the Session scope but the memory will not be reclaimed until the actual session timeout.

    What you can do is session.setMaxInactiveInterval(int) set it to very a low number in ms so it expires right away and release the memory. Then do a cflocation and for safe mesure use addToken="no"

      Modified On Apr-05-2018 06:42:50 AM


Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.