disable warning when killing the session

Hi everyone,

I’m coding an application which have two differents behaviour when killing session and log out the user :

1-The user click on a log out button and he's redirected to the login page.
2-After 20min of inactivity, the user is loged out automatically and redirected to the login page.

The problem is for the first use case. Is there a way to disable the warning message when clicking on the button : take note any unsaved data and…?

I want the user to be redirected immediatly after the click, i don’t want him to click a second time on another button.

Thanks in advance for your reply,


Hi, something like this?

Button logoutButton = new Button("Log out", e -> {
    // alternatively you can do the following to close the whole HTTP session
    // getSession().getSession().invalidate()
    getPage().setLocation("my login url");


Thanks you for your reply, you helped me a lot!