DButil db = new DButil(); conn = db.getConn(); System.out.println(conn); s =conn.createStatement(); String sql = "select * from user where username='"+bean.getUsername()+"'and password='"+bean.getPassword()+"'"; System.out.println(sql); //i = s.executeUpdate(sql); i=s.executeUpdate(sql);