String sql2="select count(*) from table where column=?";
PreparedStatement pst2=conn.prepareStatement(sql2);
pst2.setString(1,name);
if(count!=0){
session.setAttribute("errmsg2", "用户名已存在,请重新输入");
}else{
if(count!=0)这边报错了怎么解决