invalidateSession Invalidates the current HTTP session and removes all session data. This is the correct way to terminate the whole application. Such method should be associated to the “Exit” function of your application. General format void invalidateSession()