public   DataSource  getDataSource(){
return   dataSource;
}
public   User   register(User  user){
Connection  conn=null;
PreparedStatement   pstmt=null;
try{
conn=getDataSource().getConnection();这是出错行,不知道怎么就错了
String   sql="insert  into  text  values (?,?)";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1,user.getUsername());
pstmt.setString(2,user.getPassword());
pstmt.execute();
System.out.print("execute");
}
public String execute() throws Exception {
// TODO Auto-generated method stub
userDao.register(user);这个也是报错行,真不知道哪错了

return  SUCCESS;
}错误提示:
java.lang.NullPointerException
at com.action.UserDao.register(UserDao.java:30)
at com.action.registerAction.execute(registerAction.java:21)
请帮帮忙吧,    <Context  reloadable="true">
    <Resource  name="jdbc/gaofeng"  auth="Container" type="javax.sql/DataSource"
    driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
    url="jdbc:sqlserver://localhost:1433;DataBaseName=gaofeng"
    username="sa"
    password="123"
    maxActive="100"
    maxIdle="30"
    maxWait="-1"
    ></Resource>
    </Context> <resource-ref>
<description>DB  Connection</description>
<res-ref-name>jdbc/gaofeng</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>