List of usage examples for com.vaadin.server VaadinRequest getCookies
public Cookie[] getCookies();
Cookie
objects the client sent with this request. From source file:de.metas.procurement.webui.service.impl.LoginRememberMeService.java
License:Open Source License
private Cookie getRememberMeCookie() { final VaadinRequest vaadinRequest = VaadinService.getCurrentRequest(); if (vaadinRequest == null) { logger.warn(/*from w w w. j a va 2 s . c o m*/ "Could not get the VaadinRequest. It might be that we are called from a websocket connection."); return null; } // // Get the remember me cookie final Cookie[] cookies = vaadinRequest.getCookies(); if (cookies == null) { return null; } for (final Cookie cookie : cookies) { if (COOKIENAME_RememberMe.equals(cookie.getName())) { return cookie; } } return null; }
From source file:edu.nps.moves.mmowgli.MmowgliSessionGlobals.java
License:Open Source License
public String getVaadinSessionCookie() { if (sessionCookie == null) { // try once VaadinRequest req = VaadinService.getCurrentRequest(); if (req != null) sessionCookie = getCookie(req.getCookies()); }/* w w w.ja va 2 s. c om*/ return (sessionCookie == null ? "null" : sessionCookie.getValue()); }