Work hard
风灵风之子的个人资料
- 省份: 江苏
- 地区: 苏州
管理 给我的留言
-
yuhuofei 留言于2008-06-09 14:28:02
- 悄悄话,只给空间主人查看...
-
tgm923 留言于2008-06-03 09:45:30
- struts2+spring+hibernate整合action报空指针异常package cn.edu.action;
import cn.edu.dao.DAOException;
import cn.edu.dao.impl.Userdao;
import cn.edu.service.UserServices;
import cn.edu.vo.Uservo;
import com.opensymphony.xwork2.ActionSupport;
public class Useraction extends ActionSupport {
public String userName;
public String password;
public int type;
public Uservo vo=null;
public UserServices userServiceImpl;
public UserServices getUserServiceImpl() {
return userServiceImpl;
}
public void setUserServiceImpl(UserServices userServiceImpl) {
this.userServiceImpl = userServiceImpl;
}
public String addUserInfo(){
if(vo==null){
vo=new Uservo();
vo.setPassword(password);
System.out.println("######"+vo.getPassword());
vo.setType(type);
System.out.println("######"+vo.getType());
vo.setUserName(userName);
System.out.println("######"+vo.getUserName());
try {
System.out.println(getUserServiceImpl());
userServiceImpl.addInfo(vo);这里报空指针异常,找了好久不知道哪里出错,希望你能帮我看看啊
} catch (DAOException e) {
System.out.println(e.getMessage());
}
}
return SUCCESS;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
}
-
tgm923 留言于2008-06-03 09:43:46
- 多少
-
wwwwwrqq 留言于2008-05-18 22:49:01
- 希望楼主,多发一些对框架的评价和解释
-
静静的雪 留言于2007-05-23 13:41:55
- 再怎么也得注册一个友情连接吧
我的BLOG from black costline
www.recir.cn
