public Page pagedQuery(int start,int limit,String sort,String dir) {
		StringBuilder sql = new StringBuilder("select * from student");
		if(sort != null && !sort.equals("") && dir != null && !dir.equals("")){
			sql.append(" order by " + sort + " " + dir);
		}
		sql.append(" limit " + start + " , " + limit);
		List<Student> result = null;
		try{
			conn = DbUtil.getConnection();
			pstmt = conn.prepareStatement(sql.toString());
			rs = pstmt.executeQuery();
			result = new ArrayList<Student>();
			while(rs.next()){
				Student student = new Student();
				student.setId(rs.getInt("id"));
				student.setCode(rs.getString("code"));
				student.setName(rs.getString("name"));
				student.setSex(rs.getInt("sex"));
				student.setBirthday(rs.getString("birthday"));
				student.setOrigin(rs.getString("origin"));
				student.setDept(rs.getString("dept"));
				result.add(student);
			}
		}catch(SQLException e){
			e.printStackTrace();
		}finally{
			DbUtil.close(rs, pstmt, conn);
		}
		//查询学生信息的数量
		int totalCount = 0;
		try{
			conn = DbUtil.getConnection();
			pstmt = conn.prepareStatement("select count(*) from student");
			rs = pstmt.executeQuery();
			if(rs.next()){
				totalCount = rs.getInt(1);
			}
		}catch(SQLException e){
			e.printStackTrace();
		}finally{
			DbUtil.close(rs, pstmt, conn);
		}
		
		Page page = new Page(totalCount,result);
		return page;
		
	}