大家看看这个语法对吗?加个非空判断,怎么不起作用呢???
if(username!=null&&password!=null){
if("admin".equals(username)&&"admin".equals(password)){
request.getRequestDispatcher("login_success.jsp").forward(request, response);
}else{
response.sendRedirect("login_failure.jsp");
}
}