protected void initState(SessionState state, VelocityPortlet portlet, JetspeedRunData rundata) { HttpServletRequest req = rundata.getRequest(); Session session = SessionManager.getCurrentSession(); if (getVmReference("is_wireless_device", req) == null) { Object c = session.getAttribute("is_wireless_device"); setVmReference("is_wireless_device", c, req); } // Set a CSRF token for velocity-based forms if (getVmReference(SAKAI_CSRF_TOKEN, req) == null) { Object csrfToken = session.getAttribute(UsageSessionService.SAKAI_CSRF_SESSION_ATTRIBUTE); setVmReference(SAKAI_CSRF_TOKEN, csrfToken, req); } }
protected void initState(SessionState state, VelocityPortlet portlet, JetspeedRunData rundata) { HttpServletRequest req = rundata.getRequest(); Session session = SessionManager.getCurrentSession(); if (getVmReference("is_wireless_device", req) == null) { Object c = session.getAttribute("is_wireless_device"); setVmReference("is_wireless_device", c, req); } // Set a CSRF token for velocity-based forms if (getVmReference(SAKAI_CSRF_TOKEN, req) == null) { Object csrfToken = session.getAttribute(UsageSessionService.SAKAI_CSRF_SESSION_ATTRIBUTE); setVmReference(SAKAI_CSRF_TOKEN, csrfToken, req); } }