用了struts2提供的验证框架EmployeeAction-validation.xml后对应的Action却出了问题,查询一张表的所有记录时却报找不到对应的action。
HTTP Status 404 - No result defined for action com.test.action.EmployeeAction and result input--------------------------------------------------------------------------------type Status reportmessage No result defined for action com.test.action.EmployeeAction and result inputdescription The requested resource (No result defined for action com.test.action.EmployeeAction and result input) is not available.
--------------------------------------------------------------------------------Apache Tomcat/6.0.16public class EmployeeAction extends ActionSupport {
private EmployeeManager employeeManager;
private Employee employee;
@SuppressWarnings("unchecked")
private List employees;
private Integer id;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@SuppressWarnings("unchecked")
public List getEmployees() {
return employees;
}
@SuppressWarnings("unchecked")
public void setEmployees(List employees) {
this.employees = employees;
}
public Employee getEmployee() {
return employee;
}
public void setEmployee(Employee employee) {
this.employee = employee;
}
public void setEmployeeManager(EmployeeManager employeeManager) {
this.employeeManager = employeeManager;
}
public String add(){
employeeManager.addEmployee(employee);
return SUCCESS;
}
public String list(){
System.out.println("list");
this.employees=employeeManager.listEmployee();
return SUCCESS;
}
public String delete(){
employeeManager.deleteEmployee(employee.getId());
return SUCCESS;
}
public String load(){
this.employee=employeeManager.getEmployee(employee.getId());
return SUCCESS;
}
public String update(){
employeeManager.updateEmployee(employee);
return SUCCESS;
}
}