so I want to configure a timeout for my vaadin application. So I read this page in the documentation: https://vaadin.com/docs/v13/flow/advanced/tutorial-application-lifecycle.html
And there it states I have to configure that closeIdleSessions = true and some session-timeout parameter.
I’ve tried to find examples but most them are for vaadin 7 or 8. My configuration so far is:
@WebServlet(asyncSupported = true, urlPatterns = "/*")
@VaadinServletConfiguration(productionMode = false, closeIdleSessions = true)
@Component(immediate = true, service = Servlet.class)
public class VaadinServletRegistration extends VaadinServlet
Thanks for the reply, we are not using a WebAppContext in our project. Should I find out how to make one?
Is it possible to declare the session-timeout variable in an annotation or by getting the current VaadinSession.curent()?
Maybe this: ServletContextHandler.getSessionHandler() instead WebAppContext ?
I cannot answer about annotation or VaadinSession.curent() because i was provide an examples from our current project and we haven’t more other.
So I looked into it more deeply thanks to your advice. And it seems I cannot configure the VaadinSession session-timeout parameter. But it’s possible to configure the http-session session-timeout through either using the following code:
You can also change the configuration in the web server itself, that what we decided to do now. But it would be nice if this is configerable for vaadinSessions too through the VaadinServlet.