问题
After logout I need to invalidate session and start a new immediately. I used the function
VaadinSession.getCurrent().getSession().invalidate();
After several seconds a red box "Session expired" appears. User must click on it or press F5. How to avoid it and to display new session page immediately?
In javascript is it easy:
document.location='/';
How to do the same in Vaadin? The behavior should be the same as by first visit the page after restarting explorer.
回答1:
In my project I use this:
Page.getCurrent().setLocation( "/" );
VaadinSession.getCurrent().close();
来源:https://stackoverflow.com/questions/26404821/how-to-restart-vaadin-session