public UserBean getUser( Connection  conn) throws Exception{
        UserBean user = new UserBean();
        Statement stmt=conn.createStatement();
        String sql="select * from test";
        ResultSet rs=stmt.executeQuery(sql);
        while(rs.next()){
        String name = (String)rs.getString(0);
        String password = (String)rs.getString(1);
            user.setName( name );
            user.setPassword( password );
        } 
        rs.close();
        stmt.close();
        conn.close();
        return user;
    }
