UserAction 这个类看下有没有把 成员 实例化 或者参数是不是 null
ublic class UserAction {
private User user;
//private UserService us ; //问题!!
//private UserServiceImpl us = new UserServiceImpl(); //问题!!
private UserDAO uDao = new UserDAO(); //要进行实例化
public String login(){
System.out.println(user.getUsername());
uDao.SaveUser(user); //问题!!
return "login";
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public UserDAO getuDao() {
return uDao;
}
public void setuDao(UserDAO uDao) {
this.uDao = uDao;
}
}