jsp学习笔记(11)

…
	HttpSession session = request.getSession();
	ArrayList login = (ArrayList) session.getAttribute("login");
	if(login == null || login.equals("")){
		//非登入用户
		pathStr="…/error.jsp";
		}
	RequestDispatcher rd = request.getRequestDispatcher(pathStr);
	rd.forward(request, response);
	…

你可能感兴趣的:(java,jsp)