输入用户名和密码为什么session里面是空值???
String username="";
String password="";
request.setCharacterEncoding("utf-8");
username=request.getParameter("username");
password=request.getParameter("password");
if("admin".equals(username)&&"admin".equals(password)){
session.setAttribute("loginuser", username);
//request.getRequestDispatcher("login_success.jsp").forward(request, response);
}else{
//response.sendRedirect("login_failure.jsp");
}
%>
<%=session.getAttribute("username") %><br />