①找到登录界面 提交表单到 action为一个servlet地址
HttpSession session = request.getSession();
String username = request.getParameter("username");
String password = request.getParameter("password");
UserService userService=new UserService();
User user=null;
try {
user = userService.checkLogin(username, password);
} catch (SQLException e) {
e.printStackTrace();
}
if (user==null){
System.out.println(&