public void login(HttpServletRequest request, HttpServletResponse response) {

		
		response.setContentType("UTF-8");
		HttpSession session;
		try {
		session = request.getSession();
		String username = new String(request.getParameter("username").getBytes("ISO-8859-1"),"UTF-8");
		String password = request.getParameter("password");

		User u = new User();
		u.setName(username);
		u.setPass(password);
		UserDAO udao = new UserDAO();
	
			request.setCharacterEncoding("UTF-8");
			
			if (udao.userTest(u)) {
				
				User userInfo = udao.querryUseName(username);
				session.setAttribute("userInfo",userInfo);
				this.querryAllBooks(request, response);
			} else {
				request.getRequestDispatcher("../userView/login.jsp").forward(
						request,response);
			}
		} catch (Exception e) {

			e.printStackTrace();
		}
	}