登录判断,清除中间变量

logger.debug("登录失败");
request.getSession().setAttribute("lose","lose");
response.sendRedirect("login.jsp");
<%
    // 临时判断
    if(session.getAttribute("lose")!=null){
        pageContext.setAttribute("loginFail",true);
        session.removeAttribute("lose");
    }
%>
var loginFail = "${loginFail}"
        if(loginFail) {
            layer.msg("账户密码错误")
}

 https://www.cnblogs.com/cn9826/p/13670049.html

原文地址:https://www.cnblogs.com/monster-jian/p/13671317.html