接上

版权声明:版权所有,若要转载,请注明出处! https://blog.csdn.net/f1605089018/article/details/88382422

boolean canLogin =userbiz.checkLogin(username,password);

if(canLogin){

    req.getSession().setAttribute("loginuser",username);

   req.sendRedirect("main.jsp");

}

检测是否登陆

<%

String username=(String) session.getAttribute("loginuser");

if(username==null){

response.sendRedirect("login.jsp");

}

扫描二维码关注公众号,回复: 5484305 查看本文章

%>

猜你喜欢

转载自blog.csdn.net/f1605089018/article/details/88382422
今日推荐