jsp中用session怎么保存用户名和密码

来源:百度知道 编辑:UC知道 时间:2024/07/02 09:51:17

放:request.getSession().setAttribute("yhmm",你的密码字符串);
得:String yhmm= (String) request.getSession().getAttribute("yhmm");

session.setAttribute(\"SESSIONNAME\",\"VALUE\")

页面中的写法:
session.setAttribute("user",用户);
session.getAttribute("user");
java中的写法:
如楼上