存session HttpSession session = request.getSession(); session.setAttribute("phone", phone); 从session取值 HttpSession session = request.getSession(); String phone = session.getAttribute("phone").toString();