jsp+servlet

阅读更多

try{
conn = ConnectionFactory.getConnction();
state = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
rs = state.executeQuery(sql);
while(rs.next()){
Role role = new Role();
int i =1;
role.setId(rs.getInt(i++));
role.setAdmins(rs.getString(i++));
role.setPass(rs.getString(i++));
role.setSitename(rs.getString(i++));
role.setChecks(rs.getInt(i++));
role.setVotename(rs.getString(i++));
list.add(role);
}

你可能感兴趣的:(jsp+servlet)