为什么登录失败?代码和登录帐号密码都没问题啊
<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %>
<%
request.setCharacterEncoding("utf-8");
%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String username="";
String password="";
request.setCharacterEncoding("utf-8");
//如果用户和密码都是admin,则登陆成功
if("admin".equals(username)&&"admin".equals(password))
{
request.getRequestDispatcher("login_success.jsp").forward(request,response);
}
else
{
response.sendRedirect("login_failure.jsp");
}
%>