小女初学者,各位大神帮忙啊!环境为Netbeans IDE 6.8代码如下: 
private boolean valid(HttpServletRequest request, LoginActionForm loginActionForm) {
        DataSource ds = null;
        Connection cn = null;
        boolean b = false;
        try {
            ds = getDataSource(request) ;//此处getDataSource()下有红线,标识找不到符号 

            cn = ds.getConnection();
            Statement st = cn.createStatement();
            ResultSet rs = st.executeQuery("select * from user where username='" + loginActionForm.getUsername()
                    + "' and password='" + loginActionForm.getPassword() + "'");
            if (rs.next()) {
                b = true;
            }
            rs.close();
            st.close();
            cn.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return b;
    }