67,512
社区成员
发帖
与我相关
我的任务
分享
//编辑
public String edit() throws Exception {
String[] id = (String[]) ActionContext.getContext().getParameters().get("id");
if(null == id) {
return INPUT;
} else {
System.out.println("hello");
String idStr = "";
for(String s:id) {
idStr += s;
}
Blog blog = sb.findById(new Integer(idStr));
ActionContext.getContext().put("blog", blog);
return SUCCESS;
}
}
发送请求时,字符串hello 都打印出来了,应该返回success,但不知道为什么还会出现result 'null'这个错误;struts.xml配置文件是没有问题的