会话在LocalHost中工作正常,但在托管站点/ Live网站中不工作

时间:2018-10-22 10:09:05

标签: spring spring-mvc session

session.setAttribute("DriverList", list);

此方法显示为空白

@RequestMapping("AllocateDriverToVerifier")
public String AllocateDriverToVerifier( HttpServletRequest request, Map<String, List<?>> map) {

    HttpSession session = request.getSession(false);

    try {
        System.out.println("Driver List Is "+ session.getAttribute("DriverList")
        List<String> list = (List<String>) session.getAttribute("DriverList");
    }
}

显示为空

我将列表保存在ajax调用的会话中,并在控制器中检索

0 个答案:

没有答案