Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
how to manage sessions in Itmill toolkit based application?
I have an application using itmill toolkit framework, and i want to manage sessions as i would in a jsp servlet application. But dont have a clue about how to do it.
Can someone help me out.
I will appreciate for any fast responce
You can get the javax.servlet.http.HttpSession from WebApplicationContext.
Just cast current ApplicationContext to WebApplicationContext and get current session from there, example:
ApplicationContext ctx = getContext(); WebApplicationContext webCtx = (WebApplicationContext) ctx; HttpSession session = webCtx.getHttpSession();
I have an application using itmill toolkit framework, and i want to manage sessions as i would in a jsp servlet application. But dont have a clue about how to do it./quote]
Toolkit app lives in the same http-session as those JSP:s. So it uses the same session timeout, etc. When the session ends (times out), close() will be called from your application.
You can access the request and then session object directly by registering a transaction listener:
to applicationcontext (yourapp.getApplicationContext()). Then just cast the transactionData object to HttpServletRequest ja getSession from there.
Thanks guys for your fast response...i will be working on your suggestions and will post back the results.