PreparedStatement pst = conn.prepareStatement(sql);
Object[] pars ={user.getName(),user.getPwd()};
for(int i =0 ;i<pars.length;i++){
pst.setObject(i+1,pars[i]);
}
执行queryUpdate 返回-1 失败
获取HTTPSession对象:
HTTPSession session=request.getSession();
setAttribute()