Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 1 week ago
request.getSession(true) - returns session = null
My code:
@Theme("valo")
public class DashboardApplication extends UI {
@Override
public void init(VaadinRequest request) {
final HttpServletRequest req = ((VaadinServletRequest) VaadinService.getCurrent().getCurrentRequest()).getHttpServletRequest();
final HttpServletResponse res = ((VaadinServletResponse) VaadinService.getCurrentResponse()).getHttpServletResponse();
...
HttpSession session = req.getSession(true);
ClientContext context = new ClientContext();
session.setAttribute(CommonConst.CLIENT_CONTEXT, context);
here session = null.
if debug my app by putting breakpoint on line (8) - all ok! why?
thanks
Last updated on
Maybe you are using a broken Servlet container (webserver)?
All good here, using Vaadin 7.6.8 and Tomcat v8.0 running on OSX 10.11.6.
Even when not debugging.
Best,
Enver
Last updated on
Would you be so kind and elaborate?
Or even better, report the bug at
dev.vaadin.com ?
Thanks,
Enver
Last updated on
You cannot reply to this thread.