Clear session

Simple question: How does one clear default session cookie that has been set automatically by Vaadin.

I’m just creating very simple form where user submits name, phone and other good stuff but after submission I would like to clear start clear. How do I do that?

You can pass a parameter called “restartApplication” in the URL, that will do the trick for you.

So if your app is located at “http://localhost:8080/myapp”, you can restart it by requesting the URL “http://localhost:8080/myapp?restartApplication

Or you could call
Application.close
(). Or just clear the data from the form…

We use the following method in our application class:

public void logout() {
    ((WebApplicationContext)getContext()).getHttpSession().invalidate();
}

The close() - method doesn’t do the trick for us, because it doesn’t actually touch the session and we have other things depending on it. Spring session scoped beans, for instance.