错误信息是这个
我的action中这样写的
<!-- 增加学生的方法 -->
<action name="addStudentAction" class="addStudentAction" method="addStudentAction">
<result name="success" type="redirect">student.jsp</result>
<result name="error">error.jsp</result>
</action>
action代码这样的
package com.yzj.action;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import com.opensymphony.xwork2.ActionSupport;
import com.yzj.model.Student;
import com.yzj.service.StudentService;
@Component("studentAction")
@Scope("prototype")
public class StudentAction extends ActionSupport {
HttpServletRequest request;
private StudentService studentService;
private String username;
private List<Student> student;
private Student stu;
public Student getStu() {
return stu;
}
public void setStu(Student stu) {
this.stu = stu;
}
public HttpServletRequest getRequest() {
return request;
}
public void setRequest(HttpServletRequest request) {
this.request = request;
}
public List<Student> getStudent() {
return student;
}
public void setStudent(List<Student> student) {
this.student = student;
}
public StudentService getStudentService() {
return studentService;
}
public void setStudentService(StudentService studentService) {
this.studentService = studentService;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String findAllStudent() {
System.out.println("000000000000000");
student = studentService.findAllStudent();
System.out.println("111111111111111111");
if (student != null && student.size() > 0 ) {
return "success";
}
return "error";
}
}
不知道怎么回事,求大神!!