作业帮 > 综合 > 作业

HTTP Status 404 - No result defined for action com.project.w

来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:综合作业 时间:2024/05/16 14:41:26
HTTP Status 404 - No result defined for action com.project.web.action.PersonAction and result succ
type Status report
message No result defined for action com.project.web.action.PersonAction and result success
description The requested resource (No result defined for action com.project.web.action.PersonAction and result success) is not available.
在我的项目里配置了hibernate和struts2,运行的时候出现了这样的错误.
我的struts.xml配置文件是这样子的:





log
page/login_struts2.jsp
/page/manage.jsp
/page/register.jsp


/page/manage.jsp



我的action是这样的:
public String login() {
Map request = (Map) ActionContext
.getContext().get("request");
Person pn = biz
.searchPerson(person.getUsername(), person.getPassword());
if (pn == null) {
request.put("message", "登录失败");
return "fail";
} else {
request.put("message", "登录成功");
return SUCCESS;
}
}
它进入了action,运行最后报了错.求大神.
HTTP Status 404 - No result defined for action com.project.w
log
page/login_struts2.jsp
log和page/login_struts2.jsp前面是否需要加“/”
再问: 不是这个问题,那个是我写错了,但是我根本就不让他跳到这里面来。不过还是谢谢你,我解决了。是因为action name="person" class="com.project.web.action.PersonAction">的person名字的问题。