日期:2014-05-17 浏览次数:20628 次
private HttpServletRequest request = ServletActionContext.getRequest();
public String checkResult(){
Member m4 = new Member() ;
Member m3 = new Member();
m3.setName(info.getName().trim());
m3.setQuestion(info.getQuestion().trim());
m3.setResult(info.getResult().trim());
m4 = memberManager.loadByName(info.getName().trim());
info = memberManager.getInfo(m4);
if(memberManager.checkQuestionByResult(m3)){
System.out.println("info.getId()" + info.getId());//这里能打印出来id的
request.getSession().setAttribute("info", info);
// request.setAttribute("info",info);
System.out.println(request.getAttribute("info.id"));//但是到这里就打印不出来了,显示的是null
return "success" ;
}
return "fail" ;
}