67,550
社区成员




HTTP Status 404 - There is no Action mapped for namespace [/student/jibeninfo] and action name [danganziliao] associated with context path [/SSH].
<bean id="studentAction" class="com.xjgl.server.controller.action.student.StudentAction" scope="prototype"/>
Action
package com.xjgl.server.controller.action.student;
import javax.annotation.Resource;
import org.apache.log4j.Logger;
import com.opensymphony.xwork2.ActionContext;
import com.xjgl.server.entity.Usertb;
import com.xjgl.server.entity.child.StudentAll;
import com.xjgl.server.exception.MyException;
import com.xjgl.server.service.student.StudentService;
public class StudentAction {
private static final Logger log = Logger.getLogger(StudentAction.class);
@Resource
private StudentService studentService;
/**
* 查询一个学生的综合信息
* @return
*/
public String getZonghexinxi(){
/*
*1、从session中取得保存的学号
*2、通过学号查询
*3、保存查询(失败时保存异常信息)
*4、无论成功失败都返回到综合信息页面
*/
StudentAll student = new StudentAll();
Usertb user = (Usertb) ActionContext.getContext().getSession().get("user");
try {
student = studentService.findStudentInfoBySno(user.getUsernumber().trim());
log.debug("查询出学号为" + student.getSno() + "的学生的信息");
ActionContext.getContext().put("student", student);
return "success";
} catch (MyException e) {
log.debug("查询失败");
ActionContext.getContext().put("msg", e.getMessage());
return "fail";
}
}
/**
* 查询学生的档案资料
* @return
*/
public String getDanganziliao(){
/*
*1、从session中取得保存的学号
*2、通过学号查询
*3、保存查询(失败时保存异常信息)
*4、无论成功失败都返回到档案资料页面
*/
StudentAll student = new StudentAll();
Usertb user = (Usertb) ActionContext.getContext().getSession().get("user");
try {
student = studentService.findStudentInfoBySno(user.getUsernumber().trim());
log.debug("查询出学号为" + student.getSno() + "的学生的档案资料");
ActionContext.getContext().put("student", student);
return "success";
} catch (MyException e) {
log.debug("查询失败");
ActionContext.getContext().put("msg", e.getMessage());
return "fail";
}
}
}